View Full Version : Latest News Hack
Bharrabhaz
10-03-2005, 10:00 AM
Hi guys:
I have the latest news plugin installed in my frontpage, but can i change the default data position?
Default:
A new notice in our site today
31/08/2005
I can change for this:
31/08/2005 - A new notice in our site today
Simple?
Bharrabhaz
Bharrabhaz
10-04-2005, 04:21 AM
If u want a good thing, make yourself :P !!! hehehehe
Lets go:
In p3_latestnews folder, edit the file latestnews.php.
In the line 259, remove the </br> tag, like this:
$subtitle = '<br />' . iif($article['datestart'] != 0, DisplayDate($article['datestart']), DisplayDate($article['datecreated']));
will stay:
$subtitle = ' ' . iif($article['datestart'] != 0, DisplayDate($article['datestart']), DisplayDate($article['datecreated']));
This is for dont have a break line in the news list.
Now will put the date in front of the news title:
In the line 297, search the code:
echo '<a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $boldtitlestart . $article['title'] . $boldtitleend . '</a>' . $categoryname . $subtitle . '<br />' . $printlink . $emaillink;
and modify the position of the . $subtitle TAG for BEFORE the $boldtitlestart , if in this case, is the news title link. Lets go:
echo '<a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $subtitle .' - ' . $boldtitlestart . $article['title'] . $boldtitleend . '</a>' . '<br />' . $printlink . $emaillink;
Note if i put the code .' - ' in between the tags, for separate the date from the news title.
Just this.
This hack works in Subdreamer 2.2 Pro , but it´s easy change the others versions (i think).
PS: I´m not a programmer, but i have many persistence :lol: ;) ;
PS2: Sorry for my poor english.
Bharrabhaz
thomas
10-04-2005, 05:18 AM
well i was going to say, have a look through the source code through to see if you can find it yourself
:D
well done!
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.