• [MOD]Another Simple News Publishing Mod 5 0 5 1
Currently:  

Author Topic: [MOD]Another Simple News Publishing Mod  (Read 348963 times)

0 Members and 1 Guest are viewing this topic.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #150 on: January 16, 2006, 05:58:45 PM »
Quote

this should hums of to be realigned to have


This has already been reported in the past. Althought, I do not think there's a fix for this yet. There must be a mis-calculated statement from admin/news.php file. ;)

* EDIT *

The error is here :

Quote

$limitnumber = "";
  if ($limitnumber == "") {
    $limitnumber = 5000;
  }



Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #151 on: January 16, 2006, 06:19:53 PM »
I did see it. Since you reported this error, I also stated the paragraph that "is" from your file above in the mean time.  :?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #152 on: January 19, 2006, 06:57:49 PM »
Quote

Here does nobody have a solution that news.php in acp is differently indicated?


As stated above, the error is about a mis-counted value from the bolded paragraph I mentionned from the quote. :roll:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #153 on: February 01, 2006, 04:00:19 PM »
Quote

It reported user that it with them functioned


I really can't understand what you're trying to say here . . .  :oops:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #154 on: February 01, 2006, 04:23:36 PM »
Sorry, I did not find a solution for this yet.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #155 on: March 23, 2006, 10:13:22 PM »
This mod allows to use bbcode & html. I mean in setting you have these options.
I added smilies to bbcode and it works as well.

But the only issue is.
While posting a news from ACP, I can’t see any direct option to use bbcode or smilies. I think the statement where it calls bbcode is not there.

Or m I missing Something ??
I m not a  Programmer.
          But
I m a Good Learner.

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #156 on: March 25, 2006, 02:16:09 PM »
little idea  :idea:

is it posiible to (add) allow (/or not) users comments to  news ?

Offline ch€ri{Bi}²

  • Sr. Member
  • ****
  • Posts: 315
  • A PRoBLeM wIthOUt SoLuTioN Is NoT rEAllY a PRoBLeM
    • View Profile
    • Pat's Gallery
Re: [MOD]Another Simple News Publishing Mod
« Reply #157 on: March 27, 2006, 11:57:03 AM »
While posting a news from ACP, I can’t see any direct option to use bbcode or smilies. I think the statement where it calls bbcode is not there.

Or m I missing Something ??

for the moment i think there are no code on this forum to use bbcode (with buttons!) directly in ACP... :roll:
perhaps some of the gurus or coders can cure it... but it won't be easy : there is at least 3 codes to implement bbcode on this forum... :?
ch€ri{Bi}²


Offline idijotaz

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • CLON Entertainment
Re: [MOD]Another Simple News Publishing Mod
« Reply #158 on: April 13, 2006, 07:00:29 PM »
help... im getting error
Code: [Select]
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/vhosts/laisvalaikis.yours.lt/httpdocs/index.php on line 126

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/vhosts/laisvalaikis.yours.lt/httpdocs/index.php on line 126

Offline gifwav

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://www.funpics4u.com
Re: [MOD]Another Simple News Publishing Mod
« Reply #159 on: May 08, 2006, 05:49:14 PM »
Hello,

This mod allows to use html. It works on my main news page, but the archive page doesn't.
I get something like this: <img src="images/v85_001_400.jpg" align="left" vspace=10 hspace=10>
See: http://www.urbanusvolleybal.nl/news.php

How can I solve this?

Offline tansamalaja

  • Full Member
  • ***
  • Posts: 185
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #160 on: May 29, 2006, 06:46:16 PM »
help... im getting error
Code: [Select]
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/vhosts/laisvalaikis.yours.lt/httpdocs/index.php on line 126

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/vhosts/laisvalaikis.yours.lt/httpdocs/index.php on line 126


I'm getting the same error report, has anybody an idea what's wrong?

Offline tansamalaja

  • Full Member
  • ***
  • Posts: 185
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #161 on: May 29, 2006, 07:04:01 PM »
I've got it!

#
#-----[ OPEN ]---------------------------------
#
index.php

#
#-----[ FIND ]---------------------------------
#
[qcode]unset($categories);[/qcode]

#
#-----[ AFTER, ADD ]------------------------------------------
#
[qcode]//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------

if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
   $sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." ORDER BY news_date DESC LIMIT 0, ".((isset($config['news_nb']))?$config['news_nb']:5);
else if ($config['news_home_display'] == 2)
   $sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." WHERE news_date > ".(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400)." ORDER BY news_date DESC";

$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $news .= $lang['no_news'];
  $news .= "</td></tr></table>";
}
else  {
  $news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";

  while ($image_row = $site_db->fetch_array($result))
  {
    $news .= "<tr class=\"imagerow1\">\n";
    $news .= "<td width=\"100%\" valign=\"top\">\n";
    $new_is_new = ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
      $news .= "<b>".$image_row['news_title']."</b>".(($new_is_new)?" <sup class=\"new\">".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name'], format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
    $news .= "\n</td>\n";
    $news .= "</tr>\n";

    $news .= "<tr class=\"imagerow2\">\n";
    $news .= "<td width=\"100%\" valign=\"top\">\n<br/>";
      $news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
      $news .= "<br/><br/>\n</td>\n";
    $news .= "</tr>\n";

  } // end while

  $news .= "</table>\n";
} // end else

$site_template->register_vars(array(
   "news" => $news,
   "news_archives" => $lang['news_archive'],
   "news_main" => $lang['news_main']
));
unset($news);[/qcode]

Now it's working fine by me...

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #162 on: May 29, 2006, 08:11:01 PM »
What is the difference between this MOD and the another NEWS MOD , here published too ?

 :?:

Offline cookie

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #163 on: June 12, 2006, 08:32:03 AM »
I had an error similar to this
Quote
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/mysite/images/index.php on line 130
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/mysite/images/index.php on line 130

on line 130 - I found the following line of code
Code: [Select]
"news_archives" => "<a href=\"".$site_sess->url(ROOT_PATH."news.php"\" class=\"link\">".$lang['news_archive']."</a>",
when I searched further in the forum, I found a post from TheOracle replying to ID25, who had the same error message that I did. The reply is quoted below.

Makes sense to me :

Quote

"news_archives" => "<a href=\"".$site_sess->url(ROOT_PATH."news.php"\" class=\"link\">".$lang['news_archive']."</a>",


should be :

Code: [Select]

"news_archives" => "<a href=\"".$site_sess->url(ROOT_PATH."news.php")."\" class=\"link\">".$lang['news_archive']."</a>",


Perhaps this should be changed in the original posting.  I too had the same problem as ID25, until I skimmed through and found the solution further down in the post.
« Last Edit: June 12, 2006, 09:37:44 AM by cookie »

Offline cookie

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD]Another Simple News Publishing Mod
« Reply #164 on: June 12, 2006, 10:12:50 AM »
I found another problem issue that should be added to the original post for this MOD.

I was unable to save the news settings in ACP > Settings > News

After reading through all the posts, and seeing that ID25 had the same problem that I did, I realized that there was a link to a very bizarre post from TheOracle regarding an Add-on to this module. 

It is here > http://www.4homepages.de/forum/index.php?topic=9059

However, the top post only has the text "--" and several replies from various people.  Within that thread, I found a post from TheOracle which mentions that the SQL updates/instructions is incomplete for this Module.

You must run install_news.php - which IS part of the original post(instructions) for this MOD.

However, you must also execute the following SQL through PHPMyAdmin, which adds 7 rows to the 4images_settings table

Code: [Select]
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_home_display', '1');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_nb', '10');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_nb_days', '15');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_cutoff', '3');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_html', '0');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_bbcode', '1');
INSERT IGNORE INTO `4images_settings` (`setting_name`, `setting_value`) VALUES ('news_bbcodeimg', '1');

After adding these to my 4images_settings table, I am able to change and save the news settings through ACP > Settings

This MOD would be easier to install if all the instructions were at the top of the post.

Regards.