4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: anabelle on March 16, 2005, 08:20:49 PM

Title: [MOD] Simple News Publishing
Post by: anabelle on March 16, 2005, 08:20:49 PM
Originally posted by janfy-------- Found in the google cache. http://64.233.161.104/search?q=cache:SuhrFuItXoMJ:www.4homepages.de/forum/viewtopic.php%3Ft%3D13781%26sid%3D2b4ed2e2b0d1530cf29440df0c5db5c1+news+publishing&hl=es (http://64.233.161.104/search?q=cache:SuhrFuItXoMJ:www.4homepages.de/forum/viewtopic.php%3Ft%3D13781%26sid%3D2b4ed2e2b0d1530cf29440df0c5db5c1+news+publishing&hl=es)

I've wrote a simple news system, easier than the one published by Fugazima.

MOD Demo :
http://www.myanimalsworld.com/news.php (http://www.myanimalsworld.com/news.php)

08/22/2004: Update to version 1.2.0

09/12/2004:
Update to version 1.3.0

Installation Steps:


Download zip file containing all files and installation or upgrade from 1.2 instructions

 :mrgreen:
Title: Re: [MOD] Simple News Publishing
Post by: Seraphina on March 24, 2005, 04:13:37 AM
Im having a problem with this script.  When I go to the admin section and make changes to the way the news works, they are never saved.  The values in the field actually stay blank.

Also, when I click the archives link, I get a mini version of my site using the "default" template inside the main content table.

Any ideas?
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on March 24, 2005, 07:26:29 AM
i want to know, after how many days, the news are in the arcive?? or must i do this? if yes, where???

thanx b.o.fan
Title: Re: [MOD] Simple News Publishing
Post by: Seraphina on March 25, 2005, 06:43:56 PM
If you go to the the Admin CP, there is a News configuration section there.  You can set it to archive based on the number of days since posted, or by the number of posts on the page.
Title: Re: [MOD] Simple News Publishing
Post by: langtuhaohoa on March 26, 2005, 11:11:32 AM
After install ! i go to acp ======> setting , erro :

Code: [Select]
Fatal error: Call to undefined function: show_news_display_options() in /home/timcom/public_html/ecard/admin/settings.php on line 161
Who can help me fix ?????

Thanks !
Title: Re: [MOD] Simple News Publishing
Post by: langtuhaohoa on March 27, 2005, 05:26:41 AM
help me plz
Title: Re: [MOD] Simple News Publishing
Post by: pduyma on March 28, 2005, 05:02:03 AM
Thanh for man!
Title: Re: [MOD] Simple News Publishing
Post by: langtuhaohoa on March 28, 2005, 05:13:47 AM
I don't know creat topic news ...... ! Who can help me???
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on April 03, 2005, 10:33:53 PM
hm.... nothing is show up on the news.php (arcive)!! :evil: :evil:

why?

look @ http://www.wartenaufden15.de/news.php
grrr...

log in with User: test
PW. test
http://www.wartenaufden15.de/index.php

thanx for help!

b.o.fan
Title: Re: [MOD] Simple News Publishing
Post by: abdoh2010 on April 04, 2005, 11:20:54 AM
dose it depand on the commnes ? or you made up a new tables for news ?
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on April 04, 2005, 07:43:57 PM
yes i did.

what is the news.html
and other??
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on April 07, 2005, 08:27:42 PM
hello???

someone read this?
Title: Re: [MOD] Simple News Publishing
Post by: janfy on April 27, 2005, 01:25:40 PM
I'm the creator of this mod.
Have solved your problem ?
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on April 27, 2005, 02:21:23 PM
no. the adress is http://www.wartenaufden15.de/news.php.

but nothing is shown...  :?: :?: :?: :?:

b.o.fan
Title: Re: [MOD] Simple News Publishing
Post by: ascanio on May 01, 2005, 02:39:28 AM
hi nice mod !!!! but it would be a great idea to include a feature in every news that say Read More and show the complete news :)
Title: Re: [MOD] Simple News Publishing
Post by: ascanio on May 03, 2005, 06:20:53 PM
HI i'm having the same problems that these people do ... the admin settings do not save. the news.html is not showing anything even in the demo :S
Title: Re: [MOD] Simple News Publishing
Post by: ascanio on May 03, 2005, 06:24:23 PM
I also get this error en rss reader:
Code: [Select]
Warning: fopen(http://127.0.0.2/4images17/rss.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/ascanio/domains/girlsandgirls.net/public_html/rss_reader.php on line 115
could not open XML input
Title: Re: [MOD] Simple News Publishing
Post by: b.o.fan on May 03, 2005, 06:26:30 PM
hey. had nobody an idea?

to my problem?

b.o.fan
Title: Re: [MOD] Simple News Publishing
Post by: ascanio on May 05, 2005, 05:31:15 PM
why i don't see any thing in the archive new secction?
Title: Re: [MOD] Simple News Publishing
Post by: gifwav on May 06, 2005, 03:22:40 PM
I've got the same problem!
Showing the news works o.k. But I can't see the archive.
Rss reader doesn't work either.
Title: Re: [MOD] Simple News Publishing
Post by: bibabobu on May 22, 2005, 03:56:23 PM
Hi!

i also have the problem to see or integrate the news archive to my templates.  :(

rest is working great also the acp control  :mrgreen:
Title: Re: [MOD] Simple News Publishing
Post by: Deven316 on June 19, 2005, 04:42:49 PM
I get this error in admin CP under settings:

Code: [Select]
News display mode
 
Fatal error: Call to undefined function: show_news_display_options() in /home/kingdomh/public_html/gallery/admin/settings.php on line 161

 
Title: Re: [MOD] Simple News Publishing
Post by: deenee on July 09, 2005, 12:40:03 PM
Quote
the admin settings do not save.

still got the same problem.. no idea? anyone?
Title: Re: [MOD] Simple News Publishing
Post by: deenee on July 12, 2005, 02:12:29 AM
OK I got it.. it just didn't have the tables in the mysql db, so I had to put them in there (with phpmyadmin). Before that I made a backup (everyone trying this should do the same) and added these new lines, in setting_name (and left setting_value empty):

news_home_display
show_news_display_options
news_nb
news_nb_days
news_cutoff
news_html
news_bbcode
news_bbcodeimg

Now theres still the problem that nothing is shown when you click on "Archives" (or any other text that is linked to the news.php of course). I'm sure thats a very simple thing to set up and I'm just too tired to find out or something - has anybody fixed that yet?
Title: Re: [MOD] Simple News Publishing
Post by: nyiguinyogui on September 13, 2005, 04:54:43 PM
Hello,

I have finally got this mod to work. This is what has to be done:

1st PROBLEM: Settings for news system are not saved:
   
      SOLUTION:
      As deenee said, there is some data missing in the table "settings" for the news settings to be saved.
      This is the SQL I used to insert the lines:

         INSERT INTO `settings` VALUES ('news_home_display', '1');
         INSERT INTO `settings` VALUES ('news_nb', '2');
         INSERT INTO `settings` VALUES ('news_nb_days', '10');
         INSERT INTO `settings` VALUES ('news_cutoff', '5');
         INSERT INTO `settings` VALUES ('news_html', '0');
         INSERT INTO `settings` VALUES ('news_bbcode', '0');
         INSERT INTO `settings` VALUES ('news_bbcodeimg', '0');

      As you can see, I have assigned an initial value (the number on the right for each setting) which I thought was fine.
      So copy&paste these lines in your MySQL GUI and now from the ACP you'll be able to successfully set the news settings


2nd PROBLEM: When you click on 'Archives', no news are shown.

      SOLUTION: First, I warn you I am not an expert on 4images template system, so I may have made a mistake, but apparently the solution is working.
      
      On news.php (in 4images root directory):
      
      Delete the line:
      
Code: [Select]
"news_contents" => $comments,   
      Find:
      
Code: [Select]
$contents = $site_template->parse_template("news_show");
      Add before:
      
Code: [Select]
$site_template->register_vars(array(
  "news_contents" => $comments
));

      That's it!
   
      Regards.
Title: Re: [MOD] Simple News Publishing
Post by: hyde101 on September 13, 2005, 06:32:56 PM
So, it seems like everyone solved it and now it is working?
Title: Re: [MOD] Simple News Publishing
Post by: fgallery on October 15, 2005, 01:22:41 PM
Can anoybody tell me why I'm getting in all news headers "Poste par my_username le dd.mm.yyyy hh:mm" ?
I mean why in french not in english ?
Title: Re: [MOD] Simple News Publishing
Post by: scubaguy on October 22, 2005, 09:12:58 AM
I got this mod installed ok, but I don't see any news admin links on the frontend when I am logged in as an admin.  Also the Add and Edit links do not work from the Control Panel.

I can add news directly in the database and it shows up correctly.  I am using 4images 1.7.1

Has anyone else experienced this and is there a fix?
Title: Re: [MOD] Simple News Publishing
Post by: beseech on October 24, 2005, 07:32:31 PM
how make the new subject as link ?

So its more easy for users find a "especific " new !!

 8)
Title: Re: [MOD] Simple News Publishing
Post by: beseech on October 24, 2005, 11:19:26 PM
Hello,

I have finally got this mod to work. This is what has to be done:

1st PROBLEM: Settings for news system are not saved:
   
      SOLUTION:
      As deenee said, there is some data missing in the table "settings" for the news settings to be saved.
      This is the SQL I used to insert the lines:

         INSERT INTO `settings` VALUES ('news_home_display', '1');
         INSERT INTO `settings` VALUES ('news_nb', '2');
         INSERT INTO `settings` VALUES ('news_nb_days', '10');
         INSERT INTO `settings` VALUES ('news_cutoff', '5');
         INSERT INTO `settings` VALUES ('news_html', '0');
         INSERT INTO `settings` VALUES ('news_bbcode', '0');
         INSERT INTO `settings` VALUES ('news_bbcodeimg', '0');

      As you can see, I have assigned an initial value (the number on the right for each setting) which I thought was fine.
      So copy&paste these lines in your MySQL GUI and now from the ACP you'll be able to successfully set the news settings


Well running the update_news_12_to_13.php , this make this all working fine without change nothing manually ;) , this added the missing tables :)
Title: Re: [MOD] Simple News Publishing
Post by: fgallery on October 24, 2005, 11:43:21 PM
Hello,

I have finally got this mod to work. This is what has to be done:

1st PROBLEM: Settings for news system are not saved:
   
      SOLUTION:
      As deenee said, there is some data missing in the table "settings" for the news settings to be saved.
      This is the SQL I used to insert the lines:

         INSERT INTO `settings` VALUES ('news_home_display', '1');
         INSERT INTO `settings` VALUES ('news_nb', '2');
         INSERT INTO `settings` VALUES ('news_nb_days', '10');
         INSERT INTO `settings` VALUES ('news_cutoff', '5');
         INSERT INTO `settings` VALUES ('news_html', '0');
         INSERT INTO `settings` VALUES ('news_bbcode', '0');
         INSERT INTO `settings` VALUES ('news_bbcodeimg', '0');

      As you can see, I have assigned an initial value (the number on the right for each setting) which I thought was fine.
      So copy&paste these lines in your MySQL GUI and now from the ACP you'll be able to successfully set the news settings


Well running the update_news_12_to_13.php , this make this all working fine without change nothing manually ;) , this added the missing tables :)

Installation Manual of this MOD is so messed up :evil: !
Title: Re: [MOD] Simple News Publishing
Post by: beseech on October 26, 2005, 01:45:00 AM
How make subject (title) as Link ??
Title: Re: [MOD] Simple News Publishing
Post by: lapinkulta on October 31, 2005, 04:43:40 PM
Hi!
The archive shows now all news, but the {header} and {footer} tags are not rendered anymore. How comes?
greetings,
lapinkulta
Title: Re: [MOD] Simple News Publishing
Post by: om6acw on November 18, 2005, 06:57:40 AM
hi nice mod !!!! but it would be a great idea to include a feature in every news that say Read More and show the complete news :)

make copy your news.php and rename to news_orig.php
in news.php line 78 change to this
Code: [Select]
"news_text" => multilang(format_text(substr($news_row[$i]['news_text'],0,250).'<a href="news_orig.php?id='.$news_row[$i]['news_id'].'"> ... Read more</a>',((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))), copy news.php and news_orig.php to your root directory.

Demo: http://www.myanimalsworld.com/sk/articles.php
Title: Re: [MOD] Simple News Publishing
Post by: pierse on November 21, 2005, 11:15:48 AM
I get this error when you click on archives.

Quote
Notice: Undefined index: comment_user_name in D:\Local Data\website\news.php on line 67

Title: Re: [MOD] Simple News Publishing
Post by: izone on November 21, 2005, 11:11:34 PM
anabelle, Thanks very much for this mod!

I installed this mod and it works fine  :D

But I have a problem,  :cry:

I would like to use smilies in News and I don't know how to put them there?

Is there any way/mod for showing/using smilies in admin panel for News?

And another question, When I use bbcodes in News it doesn't works, instedt in the news text it shows bbcodes tags like 

Code: [Select]
[color=blue]News[/color]

I have enabled bbcodes in admin panel for news. What shall I do?

Best Regards!
Title: Re: [MOD] Simple News Publishing
Post by: TomYork on December 07, 2005, 04:51:18 AM
When I post a news, I have the following...

Quote
Prueba -- Posté par Busologo le 07.12.2005 00:18

I translate all to spanish in main.php and admin.php but always show the same... Can anybody help me?
Title: Re: [MOD] Simple News Publishing
Post by: janfy on December 07, 2005, 10:38:11 AM
Installation Manual of this MOD is so messed up :evil: !

Sorry, but i'm french, and i try to do my best to write install guide in english.

English isn't my mother tongue :evil:

If you think you can do better than me, DO IT !

PS: Double post for the same MOD : http://www.4homepages.de/forum/index.php?topic=9064.0

PS2: Next release compliant with version 1.7.1 will be packaged ASAP

Title: Re: [MOD] Simple News Publishing
Post by: janfy on December 07, 2005, 10:48:22 AM
When I post a news, I have the following...

Quote
Prueba -- Posté par Busologo le 07.12.2005 00:18

I translate all to spanish in main.php and admin.php but always show the same... Can anybody help me?

Edit file index.php,

FIND this line :

Code: [Select]
$news .= "<b>".$image_row['news_title']."</b>  -- Posté par <b>".$image_row['user_name']."</b> le <i>".format_date($config['date_format']." ".$config['time_format'], $image_row['news_date'])."</i>";
and REPLACE by this one :

Code: [Select]
$news .= "<b>".$image_row['news_title']."</b>".sprintf($lang['news_posted_by'], $news_row[$i]['user_name'], format_date($config['date_format']." ".$config['time_format'], $news_row[$i]['news_date']));
 8)
Title: Re: [MOD] Simple News Publishing
Post by: scubaguy on December 09, 2005, 08:50:46 PM
With om6acw's Read More code above, it works great if you only have one page.  With more than one page clicking on Read More takes you back to the first page and when you click on the pagination links on the bottom you are taken to the next page, but the news items are not expanded.

Does anyone know how to fix this?

Thanks in advance.
Title: Re: [MOD] Simple News Publishing
Post by: brunorosa on December 11, 2005, 02:24:54 AM
Hello!!

I have this bug on on my website with this mod...

The code that i addes to templates/default/home.html to show the news on the front page are not working...
it just doesn't show anything...

the code that doesn't wrok is:

Code: [Select]
<table width="450" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="head1">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td class="head1">{news_main}</td>
          <td class="head1" align="right"><a class="head1" href="news.php">{news_archives}</a></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="head1" colspan="2">{news}</td>
  </tr>
</table>
<br />


This code on the home.html template doesn't work... what can i do???
Title: Re: [MOD] Simple News Publishing
Post by: Maweryk on December 12, 2005, 12:34:00 PM
Originally posted by janfy-------- Found in the google cache. http://64.233.161.104/search?q=cache:SuhrFuItXoMJ:www.4homepages.de/forum/viewtopic.php%3Ft%3D13781%26sid%3D2b4ed2e2b0d1530cf29440df0c5db5c1+news+publishing&hl=es

I've wrote a simple news system, easier than the one published by Fugazima.

MOD Demo :
http://www.bestof-sexe.com/4images/

08/22/2004: Update to version 1.2.0

09/12/2004:
Update to version 1.3.0

Installation Steps:


Download zip file containing all files and installation or upgrade from 1.2 instructions

 :mrgreen:

Hi Anabelle,

can you tell me how to add the name of the catgory to the link?

For example: http://www.bestof-sexe.com/4images/gallery-279-amateur-01.htm?page=5

gallery-279.htm works fine, but I have no idea to add the name.  :cry:

Thanks for helping!

Cheers,

Markus
Title: Re: [MOD] Simple News Publishing
Post by: janfy on December 12, 2005, 12:50:26 PM
Try to ask in the appropriated topic (http://www.4homepages.de/forum/index.php?topic=6729.0)  :?:
Title: Re: [MOD] Simple News Publishing
Post by: Maweryk on December 12, 2005, 12:55:52 PM
Try to ask in the appropriated topic (http://www.4homepages.de/forum/index.php?topic=6729.0) :?:

http://www.4homepages.de/forum/index.php?topic=6729.msg52834#msg52834 ;-)

Cheers,

Markus
Title: Re: [MOD] Simple News Publishing
Post by: Darkness2001 on December 12, 2005, 05:23:18 PM
Hello,

a fine MOD, working good  :D

Greez Darkness  :mrgreen:
Title: Re: [MOD] Simple News Publishing
Post by: mawenzi on December 12, 2005, 05:31:39 PM
For presentation of this news in a NEWS-READER :
Für die Präsentation dieser News in einem NEWS-READER :

[MOD] News-RSS-Feed V.1.0 (http://www.4homepages.de/forum/index.php?topic=10715.0)

mawenzi
Title: Re: [MOD] Simple News Publishing
Post by: bibabobu on December 19, 2005, 12:44:12 AM
Sorry,
could someone help me please.
I try to have a GIF in my posted news with <img> source </img> but it does not work for me.
I have only red cross broken image displayed.
But the path to the GIF is right.

How could i make this :?: Displaying an image or animated GIF in my News?

Title: Re: [MOD] Simple News Publishing
Post by: V@no on December 19, 2005, 01:32:10 AM
mmm....isnt it supposed to be: <img src="source">
?? :?
Title: Re: [MOD] Simple News Publishing
Post by: bibabobu on December 19, 2005, 07:04:16 AM
Yes of course you are right. I have tried this and it did not work.
Code: [Select]
<img src="source">I also tried out several different path attempts. No success  :cry:
Any idea?

EDIT:
@all
SORRy,sorry, i am soooo stupid.
Code: [Select]
<img src="./templates/default/images/newsbilder/example.gif" width="50" height="50">now it works great. i made a stupid small HTML mistake.
 :oops: :oops: :oops: :oops: :oops:
Title: Re: [MOD] Simple News Publishing
Post by: Ole16v on March 13, 2006, 04:32:43 AM
hi!

great mod!
is there a mod for commands on the news?

greets, sven
Title: Re: [MOD] Simple News Publishing
Post by: e-trader_2002 on May 07, 2006, 02:29:12 PM
When I post a news, I have the following...

Quote
Prueba -- Posté par Busologo le 07.12.2005 00:18

I translate all to spanish in main.php and admin.php but always show the same... Can anybody help me?

Edit file index.php,

FIND this line :

Code: [Select]
$news .= "<b>".$image_row['news_title']."</b>  -- Posté par <b>".$image_row['user_name']."</b> le <i>".format_date($config['date_format']." ".$config['time_format'], $image_row['news_date'])."</i>";
and REPLACE by this one :

Code: [Select]
$news .= "<b>".$image_row['news_title']."</b>".sprintf($lang['news_posted_by'], $news_row[$i]['user_name'], format_date($config['date_format']." ".$config['time_format'], $news_row[$i]['news_date']));
 8)

Hi folks,

I'm using 4images 1.7.2, installed the MOD und replaced the coding as described above. Now I get the follwing ouptut on my start-page (http://localhost:8080/4images/index.php):

-- Posted by  on 01.01.1970 01:00

So user_name is missing and news_date is filled with some default-value. The related db-fileds are filled correctly, I checked them with phpMyAdmin.

When viewing the same news in the ARCHIVES (http://localhost:8080/4images/news.php), I see the correct output:

-- Posted by e-trader_2002 on 07.05.2006 14:46

So IMHO it has to be something in the code of my Index.php:

Code: [Select]
$news .= "<b>".$image_row['news_title']."</b>".sprintf($lang['news_posted_by'], $news_row[$i]['user_name'], format_date($config['date_format']." ".$config['time_format'], $news_row[$i]['news_date']));

Can anybody help me?
Title: Re: [MOD] Simple News Publishing
Post by: Chicco on June 22, 2006, 08:41:29 AM
Ist es möglich die News nur teilweise anzeigen zu lassen auf der HOME-Seite?
Also das z.b. anstatt die komplette News-Nachricht nur immer die ersten zwei Zeilen angezeigt werden und dann ein Button wie z.b. "mehr" und bei Klick darauf erst die komplette Nachricht anzeigt wird oder man zum Archiv kommt?

Versteht Ihr wie ich es meine?

So würde man z.b. erreichen, das dieses News-Fenster auf der Homeseite immer gleich gross ist, da automatisch nach zwei Zeilen abgeschnitten wird und der Button "mehr" dafür drin steht....

English (Sorry for my English)
----------------------------------------

Is it possible the news only partly indicate to let on the HOME side? Thus e.g. instead of the complete new-message the first two lines to be only always indicated and then a Button like e.g. “more” and with click on it only the complete message indicates becomes or one to archives comes?   

Do you understand like I it my?

Thus one would e.g. reach, which is this News window on the HOME Side always equally large, since after two lines one cuts off automatically and the Button stands for “more” for it in it….


Title: Re: [MOD] Simple News Publishing
Post by: mawenzi on June 22, 2006, 02:01:41 PM
Hallo Chicco,

ich verwende diesen News-Mod nicht, daher kann ich dir nur eine beispielhafte Lösung für die Verkürzung des Newstextes geben. Die genaue Tag-Bezeichnungen müsstest du dann für deine News anpassen ...
Mit dieser Textverkürzung werden aber immer ganze Wörter angezeigt, also keine Wörter durchgeschnitten .
Code: [Select]
$max = 150; //max. Zeichen für den verkürzten Newstext
$news_text = $news_row[$i]['news_text'];
$news_text_short = (strlen($text)>$max) ? substr($text,0,$max).substr(substr($text,$max),0,strpos(substr($text,$max)," "))." ..." : $news_text;
und natürlich den neuen Tag registrieren ...
Code: [Select]
...
$site_template->register_vars(array(
...
"news_text_short" => format_text($news_text_short, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
...

im Template kannst du dann für den verkürzten Newstext den folgenden Tag verwenden ...
Code: [Select]
{news_text_short}

Aber wie gesagt, als Beispiel für dich zum anpassen ...  :wink:
Title: Re: [MOD] Simple News Publishing
Post by: Stoleti on June 24, 2006, 05:45:46 AM
Hallo Chicco,

ich verwende diesen News-Mod nicht, daher kann ich dir nur eine beispielhafte Lösung für die Verkürzung des Newstextes geben. Die genaue Tag-Bezeichnungen müsstest du dann für deine News anpassen ...
Mit dieser Textverkürzung werden aber immer ganze Wörter angezeigt, also keine Wörter durchgeschnitten .
Code: [Select]
$max = 150; //max. Zeichen für den verkürzten Newstext
$news_text = $news_row[$i]['news_text'];
$news_text_short = (strlen($text)>$max) ? substr($text,0,$max).substr(substr($text,$max),0,strpos(substr($text,$max)," "))." ..." : $news_text;
und natürlich den neuen Tag registrieren ...
Code: [Select]
...
$site_template->register_vars(array(
...
"news_text_short" => format_text($news_text_short, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
...

im Template kannst du dann für den verkürzten Newstext den folgenden Tag verwenden ...
Code: [Select]
{news_text_short}

Aber wie gesagt, als Beispiel für dich zum anpassen ...  :wink:


in english ... how added it ??  :?:
Title: Re: [MOD] Simple News Publishing
Post by: mawenzi on July 13, 2006, 04:34:47 PM
... that was an example ... I do not know the code of this MOD ...
... you must endeavor your own PHP knowledge ...
Title: Re: [MOD] Simple News Publishing
Post by: chull on January 24, 2007, 07:31:29 PM
Hallo,

Super Mod!!!

Doch würde ich den gerne als Terminankündigungen nutzen. Das Problem dabei ist, dass ein neuer Eintrag nicht am Anfang angezeigt werden soll, sondern ans Ende kommt. Also das wenn ich einen neuen Termin hinzufüge, der ganz am Ende angezeigt wird. Wie kann ich das machen?

I would like tu use this Mod to publish events. The Problem is that a new Publish is shown at first but I would like that is shown at least. How can I do that?


Greetz and Thanks


Chull
Title: Re: [MOD] Simple News Publishing
Post by: KurtW on January 24, 2007, 08:13:57 PM
Hallo chull,
teste mal dieses:

in der index.php

suche:
Code: [Select]
$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";

ersetze davon:
Code: [Select]
DESCmit
Code: [Select]
ASC

Gruß
Kurt
Title: Re: [MOD] Simple News Publishing
Post by: chull on January 25, 2007, 12:02:20 PM
Perfekt!!! It works!!!

Thanks.

The Clickstream isn't shown. Know somebody what to do?

Thank and Greetz

Chull
Title: Re: [MOD] Simple News Publishing
Post by: chull on January 25, 2007, 02:32:02 PM
Hello,

I've made a very stupid error. Now it works!!! :roll:


Greetz chull
Title: Re: [MOD] Simple News Publishing
Post by: chull on January 25, 2007, 05:13:07 PM
Hello,

I would like to add an field, when I edit an new News. It should be like the text and shwon in the archiv above the title.

What must I change to do this?

Thanks and Greetz


Chull
Title: Re: [MOD] Simple News Publishing
Post by: ujeb on January 30, 2007, 05:30:44 PM
hi.. i have problem with this mod  :(

i'm using this mod, but i'm having some troubles

in the settings i see news settings and now, after a few tries, i don't see the button of save settings. i get this errore
 "Fatal error: Call to undefined function: 1() in /membri/barstazione/cms/admin/settings.php on line 161"
the line in parte is:

line 161 in file setting.php:
   
 $value_option($setting_name, $config_value);


i'm using italian language and a 4light_gray template

what can i do?

help me  :)
Title: Re: [MOD] Simple News Publishing
Post by: ujeb on January 31, 2007, 05:54:42 PM
i need help....


 :oops:

Title: Re: [MOD] Simple News Publishing
Post by: ujeb on February 05, 2007, 09:47:44 PM
Quote
hi.. i have problem with this mod 

i'm using this mod, but i'm having some troubles

in the settings i see news settings and now, after a few tries, i don't see the button of save settings. i get this errore
 "Fatal error: Call to undefined function: 1() in /membri/barstazione/cms/admin/settings.php on line 161"
the line in parte is:

line 161 in file setting.php:
   
 $value_option($setting_name, $config_value);


i'm using italian language and a 4light_gray template

what can i do?





help me...plz!!!!!
Title: Re: [MOD] Simple News Publishing
Post by: drastx on February 06, 2007, 10:21:33 AM
Quote
hi.. i have problem with this mod 

i'm using this mod, but i'm having some troubles

in the settings i see news settings and now, after a few tries, i don't see the button of save settings. i get this errore
 "Fatal error: Call to undefined function: 1() in /membri/barstazione/cms/admin/settings.php on line 161"
the line in parte is:

line 161 in file setting.php:
   
 $value_option($setting_name, $config_value);


i'm using italian language and a 4light_gray template

what can i do?





help me...plz!!!!!

I think you did somthing wrong with this parts:

Quote
#
#-----[ OPEN ]---------------------------------
#
lang/english/admin.php

#
#-----[ FIND ]---------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "News";
$news_display_optionlist = array(
  "1" => "Show the last 'X' news",
  "2" => "Show news of the last 'X' days",
);

$setting['news_home_display'] = "News display mode";
$setting['news_nb'] = "News number";
$setting['news_nb_days'] = "Days number";
$setting['news_cutoff'] = "Number of days each news is marked as new";
$setting['news_html'] = "Allow HTML in news";
$setting['news_bbcode'] = "Allow BB-Code in news";
$setting['news_bbcodeimg'] = "Allow images (BB-Code) in news";

#
#-----[ OPEN ]---------------------------------
#
lang/french/admin.php

#
#-----[ FIND ]---------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "Nouvelles";
$news_display_optionlist = array(
  "1" => "Afficher les 'X' derničres nouvelles",
  "2" => "Afficher les nouvelles des 'X' derniers jours",
);

$setting['news_home_display'] = "Mode d'affichage des nouvelles";
$setting['news_nb'] = "Nombre de nouvelles";
$setting['news_nb_days'] = "Nombre de jours";
$setting['news_cutoff'] = "Nombre de jours ou la nouvelle est considérée comme 'nouvelle'";
$setting['news_html'] = "Autoriser le HTML dans les nouvelles";
$setting['news_bbcode'] = "Autoriser le BB-Code dans les nouvelles";
$setting['news_bbcodeimg'] = "Autoriser les images (BB-Code) dans les nouvelles";

#
#-----[ OPEN ]---------------------------------
#
admin/settings.php

#
#-----[ FIND ]---------------------------------
#
show_setting_row("highlight_admin", "radio");

#
#-----[ AFTER, ADD ]------------------------------------------
#
show_table_separator($setting_group[8], 2, "#setting_group_8");
show_setting_row("news_home_display", "show_news_display_options");
show_setting_row("news_nb");
show_setting_row("news_nb_days");
show_setting_row("news_cutoff");
show_setting_row("news_html", "radio");
show_setting_row("news_bbcode", "radio");
show_setting_row("news_bbcodeimg", "radio");

I think you need to change "$setting_group[8]" to "$setting_group[9]" or "$setting_group[10]".
Title: Re: [MOD] Simple News Publishing
Post by: ujeb on February 08, 2007, 11:15:48 AM
hi thanks..

i have make this problem...

but i now have new problem! i need you support!!!

the problem is that i don't see news in my template!!!

please see my siteweb http://barstazione.altervista.org/cms/index.php (http://barstazione.altervista.org/cms/index.php) 

you see that headlines up "who's on  line" is empty!!!

i use template "4lightgray" ...

please help me!!!

thanks
Title: Re: [MOD] Simple News Publishing
Post by: knsin0 on June 11, 2007, 12:26:57 AM
edited  :D
Title: Re: [MOD] Simple News Publishing
Post by: om6acw on June 11, 2007, 12:39:06 AM
This mod does not work with 1.7.4  :cry:

This mod work nice whit 174  :!: http://www.myanimalsworld.com/news.php (http://www.myanimalsworld.com/news.php)
Title: Re: [MOD] Simple News Publishing
Post by: knsin0 on June 11, 2007, 02:49:48 AM
Sorry, i failed installing the mod, now it works perfectly  :wink:
Title: Re: [MOD] Simple News Publishing
Post by: Fragezeichen on June 11, 2007, 12:35:31 PM
good question.
but how to add news?
Title: Re: [MOD] Simple News Publishing
Post by: knsin0 on June 11, 2007, 03:42:01 PM
you will find the link in the admin panel  :D
Title: Re: [MOD] Simple News Publishing
Post by: Fragezeichen on June 13, 2007, 01:06:58 AM
your right,just seem not for first look. :oops:

Title: Re: [MOD] Simple News Publishing
Post by: UFOSWORLD on June 24, 2007, 04:16:43 AM
Hab den Mod installiert...  läuft gut... zeigt auch News an... 

Datenbank hinzugefügt...

hatte aber Probleme bei den Admineinstellungen mit settings.php und admin.php

nun zeigt er zwar [News] in den Einstellungen an... aber er hüpft beim klick drauf nicht nach unten

er zeigt unten zwar die ganzen Felder an, aber sobald ich was editiere
(z.b, die Anzahl wie viele NEWS angezeigt werden sollen oder wie viele Tage ein NEW an den News kleben soll ) 

und dann auf speichern klicke...  steht bei nächsten betrachten wieder nix drin... die felder und die radio buttons sind leer...

was hab ich falsch gemacht?   muss ich noch was an der Datenbank editieren??

wie gesagt ... tabelle hinzugefügt...  und News werden gespeichert....

merci UFO
Title: Re: [MOD] Simple News Publishing
Post by: UFOSWORLD on June 24, 2007, 04:33:51 AM
Nachtrag ... Fehler gefunden... hatte die News.sql den zweiten Teil in die Datenbank nicht integriert...  anscheinend war das nicht bei der install_new.php dabei...

Nächstes Problem:

jetzt hab ich auf 1 News in der Anzeige gestellt... aber ich habe zwei drin

im archiv zeigt er aber keine news an....

ab wann tauchen die da auf??

UPDATE....

ganzen Thread nochmal durchgelesen und  dann die Lösung gefunden

http://www.4homepages.de/forum/index.php?topic=6824.msg46587#msg46587 (http://www.4homepages.de/forum/index.php?topic=6824.msg46587#msg46587)

thx for the solution...  works perfect...
Title: Re: [MOD] Simple News Publishing
Post by: UFOSWORLD on January 03, 2008, 02:08:43 PM
Brauche Hilfe!!!

Ist es möglich das News Modul so umzubaun das

1. die News in einer umgekehrten Reihenfolge hat...  (z.b. aktuelle News immer ganz oben)
2. die News die nicht mehr aktuell sind, verschwinden (so das halt immer die aktuellen News ganz oben sind... (falls ich z.b. Termine für die Zukunft reinschreibe, soll immer der Termin angezeigt werden der als nächstes kommen wird...  (siehe Beispiel auf Foto...) wenn der Tag rum is an dem die Events kommen, dann wird der Event nicht mehr angeziegt...
3. die Reihenfolge der angezeigten News verändert werden kann, so das z.b. eine News nachträglich hinzugefügt werden kann und wie bei den Alben mit Pfeil rauf und runter  verschoben werden kann... falls sich eben mal terminliche Änderungen ergeben, oder ein Event dazukommt...

gruss UFO
Title: Re: [MOD] Simple News Publishing
Post by: Pumaaa on December 17, 2008, 05:32:14 PM
Abend zusammen!
Habe den Mod bei mir in die Galerie eingebaut und läuft auch soweit ganz gut.
Ich lasse die News nur auf der index.php Seite anzeigen und auch nur wenn man nicht eingeloggt ist, siehe hier -> http://sunny-taeter.de/
Jetzt stellen sich für mich aber noch folgende Fragen.

1. Im Archiv erscheinen keine News. Sie sollten doch in der news.php angezeigt werden oder?
2. Ich würde gerne den Titel etwas umgestalten. Farblich, sowie von der Anordnung. Habe aber leider nirgens gefunden, wo ich z.B. ändern kann,
dass zuerst das Erstelldatum des Beitrags und dann der Titel kommt. Ist das möglich? Farbe lassen sich ja nur mit den imagerow usw. in der style.css ändern,
aber ich möchte für die News eigene Farben benutzen. Geht das irgendwie?
3. Wie kann man z.B. ein Bild in einen Beitrag einfügen? Über <img scr=" ....>? Aber auch nur wenn html erlaubt ist oder?

Ich hoffe mir kann jemand helfen ....
Danke schonmal ;)
Gruß
Title: Re: [MOD] Simple News Publishing
Post by: barkuras on December 22, 2008, 05:54:32 PM
 :flag-de: Wie kann man Nachrichten nur für eingeloggte User darstellen lassen? Also wenn jemand nicht eingeloggt ist, dann soll er die Nachrichten auch nicht sehen können. Kann mir da bitte jemand helfen?

 :flag-en: Is it possible to show news only to users that are logged in?
Title: Re: [MOD] Simple News Publishing
Post by: mawenzi on December 22, 2008, 07:20:13 PM
Hallo barkuras und willkommen im 4images Forum ...

... nun, das ist wie folgt möglich ...
... in deinem Template (z.B. home.html) verwende folgendes ...
Code: [Select]

{if user_loggedin} ... hier der Code, der nur eingeloggten Usern gezeigt werden soll ...  {endif user_loggedin}

Title: Re: [MOD] Simple News Publishing
Post by: barkuras on December 22, 2008, 07:37:04 PM
Vielen Dank für die schnelle Antwort!
Title: Re: [MOD] Simple News Publishing
Post by: sanko86 on January 21, 2009, 02:41:34 PM
Thanks

beavtiful mod

Title: Re: [MOD] Simple News Publishing
Post by: Sunny C. on January 20, 2010, 09:29:38 PM
Die Modifikation ist wirklich gut.
Funktioniert auch unter 1.7.7

Was mir aber pers. fehlt ist, dass die User keine Kommentare schreiben können.
Das wäre wirklich was feines!

Und die Letzten News werden auch nicht in der news.php angezeigt!
Title: Re: [MOD] Simple News Publishing
Post by: Sunny C. on May 20, 2010, 12:53:54 PM
Ich bekomme komischerweise diese Fehler:
Quote
DB Error: Bad SQL Query: SELECT news_title, news_text, user_name, news_date FROM 4images_news ORDER BY news_date DESC LIMIT 0,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Was bedeutet das?
Title: Re: [MOD] Simple News Publishing
Post by: Sunny C. on May 21, 2010, 02:58:02 PM
Was kann ich da tun?
Quote
DB Error: Bad SQL Query: SELECT news_title, news_text, user_name, news_date FROM 4images_news ORDER BY news_date DESC LIMIT 0,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /is/htdocs/wp1189343_OX40HRKULQ/www/gau-pc/portal/includes/db_mysql.php on line 116

Kann mir jemand helfen? Das ist erst passiert, als ich folgendes machen sollte

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

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

#
#-----[ AFTER, ADD ]------------------------------------------
#

//-----------------------------------------------------
// ----- 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);
Title: Re: [MOD] Simple News Publishing
Post by: Sunny C. on May 25, 2010, 11:20:41 AM
Da da niemand eine Idee?
Title: Re: [MOD] Simple News Publishing
Post by: Sunny C. on June 24, 2010, 10:40:41 AM
Ein Kommentarsystem dafür kann niemand erstellen oder? Das fehlt dem Mod noch!

Ps.: Wenn das [http://www.4homepages.de/forum/index.php?topic=9064.285] die gleiche Mod ist, warum werden die Thread nicht zusammegelegt?