To add a widget comments which file is correct change?
entry.php ?
[New Plugin] "News"
Moderator: Tata
Re: [New Plugin] "News"
I would do it in plugins/news/index.php. In function news() there is:
You can change it to:
The same modification has to be done to newsarchive().
Then you can define the myCommentsWidget() function in cmsimple/userfuncs.php (so it won't get overwritten with the next update of the news plugin):
Code: Select all
return '<div class="news-entry">'
. '<div class="news-entry-title">' . $entry->title() . '<span class="news-entry-title-date">' . date(News::$cf['date_format'], $entry->state()) . '</span></div>'
. '<div class="news-entry-short">' . evaluate_scripting($entry->short()) . '</div>'
. '<div class="news-entry-description">' . evaluate_scripting($entry->description()) . '</div>'
. '</div>';
Code: Select all
return '<div class="news-entry">'
. '<div class="news-entry-title">' . $entry->title() . '<span class="news-entry-title-date">' . date(News::$cf['date_format'], $entry->state()) . '</span></div>'
. '<div class="news-entry-short">' . evaluate_scripting($entry->short()) . '</div>'
. '<div class="news-entry-description">' . evaluate_scripting($entry->description()) . '</div>'
. myCommentsWidget($entry->id())
. '</div>';
Then you can define the myCommentsWidget() function in cmsimple/userfuncs.php (so it won't get overwritten with the next update of the news plugin):
Code: Select all
function myCommentsWidget($id)
{
global $hjs;
$hjs .= '<script type="text/javascript>Some JavaScript for the HEAD element</script>';
return 'some HTML';
}
Christoph M. Becker – Plugins for CMSimple_XH
Re: [New Plugin] "News"
Tnank, Christoph.
With your help, all as always works
With your help, all as always works
Disappearing title : function fgetcsv()
I tested Ver 1.1.1.
Disappearing title.
[ external image ]
http://php.net/manual/en/function.fgetcsv.php
*In my case(Japansese)
$plugin_cf['news']['csv_locale']="ja_JP.UTF-8";
[ external image ]
Disappearing title.
[ external image ]
http://php.net/manual/en/function.fgetcsv.php
Fix.Note:
Locale setting is taken into account by this function. If LANG is e.g. en_US.UTF-8, files in one-byte encoding are read wrong by this function.
Code: Select all
##################
#
#
## OPEN news/config/config.php
## Add to About Line 44
/**
* Set locale for CSV.
* @var
*/
$plugin_cf['news']['csv_locale']="";
## OPEN news/languages/en.php
## Add to About Line 93
$plugin_tx["news"]["cf_csv_locale"]="Setting the setlocale function: set when the title / content of the article does not appear/strangeness setlocale(LC_ALL, set value) are used. See http://php.net/manual/en/function.setlocale.php ";
## OPEN news/helper/csv.php
## Find to About Line 47
public static function parse($file, $delimiter, $enclosure)
{
## After Add to
// Set locale
if(News::$cf['csv_locale'] != ''){
setlocale(LC_ALL,News::$cf['csv_locale']);
}
##############################
$plugin_cf['news']['csv_locale']="ja_JP.UTF-8";
[ external image ]
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----
Don't Show ALL Entories
In help file ,
Fix.
But , news('' ,.... don't work .news('', '-13 days'); // All entries of the last 13 days in all categories.
Fix.
Code: Select all
#
### OPEN news/index.php
#### FIND
elseif (is_array($category))
{
foreach ($category as $c)
{
if (News_Category::category_exists($c))
{
$c = new News_Category($c);
$entries = $c->entries();
$all = array_merge($all, $entries);
}
}
}
#### After Add
else{
//Get all categories.
$categories = News_Category::categories();
foreach ($categories as $c)
{
$c = new News_Category( $c->name());
$entries = $c->entries();
$all = array_merge($all, $entries);
}
}
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----
Do not show filebrowser: tinyMCE4CMSimple_XH
Do not show filebrowser,
News PluginVersion: 1.1.1
+ tinyMCE4CMSimple_XH version 1.2.5 - 2015-08-11
+CMSimple_XH 1.6.7
And This Fix by manu .
http://cmsimpleforum.com/viewtopic.php? ... =10#p50148
News PluginVersion: 1.1.1
+ tinyMCE4CMSimple_XH version 1.2.5 - 2015-08-11
+CMSimple_XH 1.6.7
Code: Select all
#######################
# Do not show filebrowser
#
#For tinyMCE4CMSimple_XH version 1.2.5 - 2015-08-11
#
#
# Caution: does not necessarily with this modification is correct!!
#######################
#
# OPEN : news/admin.php
### About Line 45
if (isset($news))
{
global $sn;
### Change / Replace With
if (isset($news))
{
// global $sn;
global $sn,$edit;
### Find
#About Line430
if ($action == 'add'
AND $category !== FALSE)
{
## After Add
$edit = true; //Add
### Find
#About Line 605
if ($action == 'edit'
AND $entry !== FALSE)
{
## After Add
$edit = true; //Add
### # OPEN : tinymce4/init.php
#
## Find
$temp = str_replace(
'"%FILEBROWSER_CALLBACK%"',
$xh_editor ?
$_SESSION['tinymce_fb_callback'] :
'""',
$temp
);
## Cange / Replace With
$temp = str_replace(
'"%FILEBROWSER_CALLBACK%"',
// $xh_editor ?
// $_SESSION['tinymce_fb_callback'] :
// '""',
$_SESSION['tinymce_fb_callback'],
$temp
);
Code: Select all
//tinymce4/init.php about line 32
if (!(XH_ADM && $edit)) { // no filebrowser, if editor is called from front-end
$_SESSION['tinymce_fb_callback'] = ''; // ADD THIS LINE - suppress filebrowsercall
return '';
}
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----