Beta2: News mod - RC4 valid

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Jérôme wrote:In the PHP code, the Line has to look like the following:

Code: Select all

$query = "SELECT * FROM ".DB_PREPEND."phpwcms_news ORDER BY news_id";
And according to this anywhere else.
mod updated:.

In news.functions.inc

This changed:

Code: Select all

	$query = "SELECT * FROM phpwcms_news ORDER BY news_id";
To:

Code: Select all

	$query = "SELECT * FROM ".DB_PREPEND."phpwcms_news ORDER BY news_id";
http://www.studmed.dk Portal for doctors and medical students in Denmark
cmslover
Posts: 86
Joined: Wed 18. Feb 2004, 16:17
Location: USA, Georgia, Atlanta
Contact:

Post by cmslover »

I installed the mod with RC3 with no problem. When I try to create a news article, I get this error:

Code: Select all

Error in Query: INSERT INTO phpwcms_news SET title_news = 'HOT', category = 'Real estate', author_name = 'tran', story = '
What am I missing here?

Thanks
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

I have tested it on RC4 the release from 1th may....and it work on it...

I will update the mod tonight (I hope) - with a very cool feature made by Me, pSouper and another friend of mine... That let you browse in news in the frontend - very simpek but hard to get to work... :D :lol:

You can test a demo here:
http://www.instrukser.dk/rc4/newsmod.shtml
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

walking is very hard for fish ;)

if we knew more, we'd know it was simple.
GreenNuggs
Posts: 34
Joined: Fri 9. Apr 2004, 01:14
Location: Boston, MA. USA

Post by GreenNuggs »

Whoohoo! Let us know when its finished. I was going to starting using that mod more frequently. But I'll wait to touch it until the newer release comes out.

I've got a suggestion or two however if you are interested. Depending upon how you eventually wish this mod to be used.

#1 How about an expire function? That is, let the news item run for x many days, then get automatically deleted.

#2 Instead of forcing the use of the 3 seperate replacement tags, how about 1 replacement tag formatted similar to the {RELATED} tag where you can either specify the category of the news, how many items or how many items from the past x many days. Calling it by title is a bit misleading, as if this were latest news, wouldn't you want to have the item from within the article return the latest news in a category, not the latest news with a given title?

Just some ideas. If you need some help, let me know. I was about to add a replacement tag to the news.func.inc.php and news.functions.inc.php, but am going to hold off until you guys are finished with the new version.

Thanks for the great mod!
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

updated to beta2

Code: Select all

##   2004-05-06 Change in news.list.tmpl so the newest news is listed first
##              Add a news_mod.php - now you can browse news in the frontend...
see installing instruction in the zip file

I have no plans to update this mod anymore.. if someone want to they are more then welcome to continue the work...The mod do the job I need..

If no ones find any errors I will make this stabel...
http://www.studmed.dk Portal for doctors and medical students in Denmark
GreenNuggs
Posts: 34
Joined: Fri 9. Apr 2004, 01:14
Location: Boston, MA. USA

Post by GreenNuggs »

Thanks frold.

I saw in the upcoming updates posted by Oliver that he is going to add a content type"news" Anyone know if this is the same thing as this mod?
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

GreenNuggs wrote:Thanks frold.

I saw in the upcoming updates posted by Oliver that he is going to add a content type"news" Anyone know if this is the same thing as this mod?
I don´t think oliver use other peoples code - he makes things by himself -then he have the fully control
http://www.studmed.dk Portal for doctors and medical students in Denmark
kelley
Posts: 33
Joined: Thu 13. May 2004, 08:02

Post by kelley »

Hello,

I think I have mod news installed correctly. I added a table "phpwcms_news" and made the edits to phpwcms.php, content.func.inc.php and news_mod.php. But have a problem connection to MySQL!

I added a article and when I try and load that page I get this error

Warning: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/content/k/e/l/kelleylaw/html/include/inc_module/mod_news/inc_lib/news.functions.inc.php on line 11

Warning: mysql_query(): A link to the server could not be established in /home/content/k/e/l/kelleylaw/html/include/inc_module/mod_news/inc_lib/Warning: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/content/k/e/l/kelleylaw/html/include/inc_module/mod_news/inc_lib/news.functions.inc.php on line 11

Warning: mysql_query(): A link to the server could not be established in /home/content/k/e/l/kelleylaw/html/include/inc_module/mod_news/inc_lib/news.functions.inc.php on line 11
Error in query:SELECT * FROM phpwcms_news ORDER BY news_id on line 11
Error in query:SELECT * FROM phpwcms_news ORDER BY news_id

I change news.functions.inc.php to what Keules and Jerome stated and still get the same error.

Can someone let me know what is happening?

Thanks for the support

Kelley
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Hmm

I have been stupid plz dont tell me... :oops: :oops:

I have deleted the file on my computer and the domain is deleted as well..

So if you have this file at your comp. please share it couse I need it - now :S

"Sometimes its good to clean up but sometimes you clean up to good"

Feel free to lol at me - Today its is Frold lol day
http://www.studmed.dk Portal for doctors and medical students in Denmark
Post Reply