| Author |
Message |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Thu Oct 09, 2003 2:04 am |
  |
I was reading these forums tonight and saw THIS thread where one person had an idea about linking the Title of the article to the whole article's page.
Few people posted thier tricks and it looked like none of them were working for 6.5 and above.
I took one of those old tips and sorta ported to make it work with 6.5 and above ( I am using 6.9)
Here is goes.
modules/News/index.php:
Look for:
| Code: |
if ($catid != 0) {
$sql3 = "SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$title1 = $row3[title];
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
$morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
}
|
And change it to:
| Code: |
if ($catid != 0) {
$sql3 = "SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$title1 = $row3[title];
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $story_link<font class=\"storytitle\"> $title</font></a>";
$morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
} else {
$title ="$story_link <font class=\"storytitle\">$title</font></a>";
}
|
That is it!
You can see it working here:
http://www.chicagobase.com
All fixes and patches are applied.
I am such a thick head, took me more than 2 hours to figure this out. |
|
|
       |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Thu Oct 09, 2003 6:18 am |
  |
Very nice! Thanks for sharing. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
dsnail2000
Site Admin


Joined: Mar 17, 2003
Posts: 331
Location: Northern VA
|
Posted:
Mon Aug 16, 2004 8:09 am |
  |
anybody want to tackle the update for this hack for nuke 7 and up? |
_________________ Webmaster of ControlBooth.com
Have new module or block ideas?
Submit your ideas here or in the Suggestions Forum |
|
    |
 |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Mon Aug 16, 2004 9:25 am |
  |
You might be shocked to find this out my friend that the code it has not changed since 6.5
When I posted this message, I actually checked it on 7.4 before hit the "Submit" button. |
_________________ Only FREE Dating site for Desis. |
|
       |
 |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Mon Aug 16, 2004 9:30 am |
  |
Code from 7.4
| Code: |
if ($catid != 0) {
$row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
$title1 = stripslashes(check_html($row3['title'], "nohtml"));
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
$morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
}
|
Change it too:
| Code: |
if ($catid != 0) {
$row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
$title1 = stripslashes(check_html($row3['title'], "nohtml"));
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
$morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
} else {
$title ="$story_link <font class=\"storytitle\">$title</font></a>";
}
|
You will see this code if you have already applied ChatServ's fixes 2.5. |
_________________ Only FREE Dating site for Desis. |
|
       |
 |
dsnail2000
Site Admin


Joined: Mar 17, 2003
Posts: 331
Location: Northern VA
|
Posted:
Wed Aug 18, 2004 7:20 am |
  |
oops, had an extra space in the search string when I was trying to find the code in Dreamweaver... hate it when that happens. But I've got the code applied now and am eating my humble pie. |
_________________ Webmaster of ControlBooth.com
Have new module or block ideas?
Submit your ideas here or in the Suggestions Forum |
|
    |
 |
luchtzak
Support Mod


Joined: Mar 19, 2003
Posts: 308
|
Posted:
Wed Aug 18, 2004 1:45 pm |
  |
|
    |
 |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Wed Aug 18, 2004 2:30 pm |
  |
|
       |
 |
|
|