Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.219
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Related articles
Related articles

7 Replies / 3004 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Blocks

View previous topic :: View next topic


dconnor
Reputation: 462.2 Add RepSubtract Rep
Local time: 11:35 AM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 18 Dec 2007
Posts: 7
Points: 100 

Post Related articles Posted: Thu Aug 02, 2007 6:27 am

Hi:

I was wondering where I could get the "Related Articles" Block that is used in the news article on this site?

Thanks,

Dan
 

 
View user's profileSend private message Reply with quote

floppy
Reputation: 2088.8 Add RepSubtract Rep
votes: 22
Local time: 11:35 AM
Location: Jackson Mississippi
usa.gif

Site Admin
Site Admin

1.17 posts per day
Medals: 2 (View more...)
Super Dedicated User (Amount: 1)
Scripts/Coder
Scripts/Coder
Joined: Nov 14, 2006
Last Visit: 03 May 2012
Posts: 2353
Points: 132516 

Post Related articles Posted: Thu Aug 02, 2007 12:52 pm

Shop Purchases:
Clan Roster 2.0 · Multi Gaming (Warrior) Evo Theme · COD6 ModernWarfare 2 Teaser Splash Screen · Left for Dead Evo Extreme Version

This code needs a little refining, but I got this far on it. Open modules/News/article.php.

Find
Code:
$boxtitle = _RELATED;
$boxstuff = '<font class="content">';
$result8 = $db->sql_query('SELECT name, url FROM '.$prefix.'_related WHERE tid=\''.$topic.'\'');
while ($row8 = $db->sql_fetchrow($result8)) {
    $name = stripslashes($row8['name']);
    $url = stripslashes($row8['url']);
    $boxstuff .= '<strong><big>·</big></strong> <a href="'.$url.'" target="_blank">'.$name.'</a><br />'."\n";
}

$boxstuff .= '<strong><big>·</big></strong> <a href="modules.php?name=Search&amp;topic='.$topic.'">'._MOREABOUT.' '.$topictext.'</a><br />'."\n";
$boxstuff .= '<strong><big>·</big></strong> <a href="modules.php?name=Search&amp;author='.$aaid.'">'._NEWSBY.' '.$aaid.'</a>'."\n";
$boxstuff .= '</font><br /><hr noshade="noshade" width="95%" size="1" /><center><font class="content"><b>'._MOSTREAD.' '.$topictext.':</b><br />'."\n";

global $multilingual, $currentlang, $admin_file, $user;
if ($multilingual == 1) {
    $querylang = 'AND (alanguage=\''.$currentlang.'\' OR alanguage=\'\')'; /* the OR is needed to display stories who are posted to ALL languages */
} else {
    $querylang = '';
}
$row9 = $db->sql_fetchrow($db->sql_query('SELECT sid, title FROM '.$prefix.'_stories WHERE topic=\''.$topic."' $querylang".' ORDER BY counter DESC LIMIT 0,1'));
$topstory = intval($row9['sid']);
$ttitle = stripslashes(check_html($row9['title'], 'nohtml'));

$boxstuff .= '<a href="modules.php?name='.$module_name.'&amp;file=article&amp;sid='.$topstory.'">'.$ttitle.'</a></font></center><br />'."\n";
themesidebox($boxtitle, $boxstuff);


Replace With
Code:
$boxtitle = " Related Articles";
$checkrows = $db->sql_numrows($db->sql_query("select sid, title from ".$prefix."_stories where title LIKE %$title% $querylang order by counter desc limit 0,10"));
$boxstuff .= "<table cellspacing='2'>";
if($checkrows == 0){
$sql = $db->sql_query("select sid, title from ".$prefix."_stories where topic='$topic' $querylang order by counter desc limit 0,10");
while($row9 = $db->sql_fetchrow($sql)){
$topstory = intval($row9['sid']);
$ttitle = stripslashes(check_html($row9['title'], "nohtml"));
$boxstuff .= "<tr><td><a href=\"modules.php?name=$module_name&file=article&sid=$topstory\">$ttitle</a></font></center><hr></td></tr>";
}
}else{
$sql = $db->sql_query("select sid, title from ".$prefix."_stories where title LIKE %$title% $querylang order by counter desc limit 0,10");
while($row9 = $db->sql_fetchrow($sql)){
$topstory = intval($row9['sid']);
$ttitle = stripslashes(check_html($row9['title'], "nohtml"));
$boxstuff .= "<tr><td><a href=\"modules.php?name=$module_name&file=article&sid=$topstory\">$ttitle</a></font></center></td></tr>";
}
}
$boxstuff .= "</table>";
themesidebox($boxtitle, $boxstuff);
 

Phpnuke Downloads | VMaxxRx Male Enhancement  
View user's profileSend private messageVisit poster's website Reply with quote

dconnor
Reputation: 462.2 Add RepSubtract Rep
Local time: 11:35 AM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 18 Dec 2007
Posts: 7
Points: 100 

Post Related articles Posted: Thu Aug 02, 2007 10:08 pm

Hi:

I tried to post a reply with some issues in my article.php file, using the
Code:
 
, but was blocked from the site.

how do i post code here?

Thanks,
dan
 

 
View user's profileSend private message Reply with quote


floppy
Reputation: 2088.8 Add RepSubtract Rep
votes: 22
Local time: 11:35 AM
Location: Jackson Mississippi
usa.gif

Site Admin
Site Admin

1.17 posts per day
Medals: 2 (View more...)
Dedication (Amount: 1)
Scripts/Coder
Scripts/Coder
Joined: Nov 14, 2006
Last Visit: 03 May 2012
Posts: 2353
Points: 132516 

Post Related articles Posted: Thu Aug 02, 2007 11:14 pm

Shop Purchases:
Clan Roster 2.0 · Multi Gaming (Warrior) Evo Theme · COD6 ModernWarfare 2 Teaser Splash Screen · Left for Dead Evo Extreme Version

using the code tags. Hmmm.. I would need to see the syntax you posted. Usually javascript and a little php causes that.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

dconnor
Reputation: 462.2 Add RepSubtract Rep
Local time: 11:35 AM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 18 Dec 2007
Posts: 7
Points: 100 

Post Related articles Posted: Fri Aug 03, 2007 5:53 am

I thank you in advance for your help:

I posted it here:

http://www.encyclocentral.com/article.txt

Your thoughts?
 

 
View user's profileSend private message Reply with quote

dconnor
Reputation: 462.2 Add RepSubtract Rep
Local time: 11:35 AM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 18 Dec 2007
Posts: 7
Points: 100 

Post Related articles Posted: Fri Aug 03, 2007 6:00 am

LOL, what I forgot to writes was, all the info that was in the blocked post...

The "Related Articles" and "Vote" code was removed by a programmer several years ago, as we tried to control what appeared and did not appear in the right hand block.

I would now like to have the "Related Articles" and "Vote" appear as a right hand block. Can you help me reimplement this code back into article.php?

Thank you,

Dan
 

 
View user's profileSend private message Reply with quote


floppy
Reputation: 2088.8 Add RepSubtract Rep
votes: 22
Local time: 11:35 AM
Location: Jackson Mississippi
usa.gif

Site Admin
Site Admin

1.17 posts per day
Medals: 2 (View more...)
Super Dedicated User (Amount: 1)
Scripts/Coder
Scripts/Coder
Joined: Nov 14, 2006
Last Visit: 03 May 2012
Posts: 2353
Points: 132516 

Post Related articles Posted: Fri Aug 03, 2007 10:34 am

Shop Purchases:
Clan Roster 2.0 · Multi Gaming (Warrior) Evo Theme · COD6 ModernWarfare 2 Teaser Splash Screen · Left for Dead Evo Extreme Version

If thats your only change then the logical thing to do would be restore the original articles.php from your original distrobution download.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

dconnor
Reputation: 462.2 Add RepSubtract Rep
Local time: 11:35 AM


Noob
Noob

0.00 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 18 Dec 2007
Posts: 7
Points: 100 

Post Related articles Posted: Fri Aug 03, 2007 8:52 pm

Actually, I have a lot of SEO changes to that file.

I would like to make both the Related Article and the Vote code as blocks, so I could call to them as blocks.

But i am not converting the code correctly.

Dan
 

 
View user's profileSend private message Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Blocks


 
7 Replies / 3004 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum