PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
koun
New Member
New Member


Joined: Mar 01, 2004
Posts: 8

PostPosted: Mon May 24, 2004 12:28 pm Reply with quote Back to top

Hi,
Idea I wanna make a block that will contain the last 10 titles of a specific category. If for example i have in my news module a category named Cinema i wanna make a block that will contain the last 10 post i will make about cinema....
I posted the same idea at Karakas Forum and he gave me that link:
Only registered users can see links on this board!
Get registered or login to the forums!


with a suggestion to adapt it to my situation. The think is that i tried some thinks but without success...
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Mon May 24, 2004 3:13 pm Reply with quote Back to top

Here's something similar that might help:
Code:
<?php

if (eregi("block-Select_Stories.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $db, $user, $cookie;
$mytopic = "1";   
$a = 1;
$row = $db->sql_fetchrow($db->sql_query("SELECT sid, title FROM ".$prefix."_stories WHERE topic='$mytopic' ORDER BY sid DESC LIMIT 0,10"));
while ($row = $db->sql_fetchrow($result)) {
    $r_options = "";
    if (isset($cookie[4])) { $r_options .= "&amp;mode=$cookie[4]"; }
    if (isset($cookie[5])) { $r_options .= "&amp;order=$cookie[5]"; }
    if (isset($cookie[6])) { $r_options .= "&amp;thold=$cookie[6]"; }
    $content .= "<strong><big>&middot;</big></strong>&nbsp;$a: <a href=\"modules.php?name=News&amp;file=article&amp;sid=$row[sid]$r_options\">$row[title]</a><br>";
    $a++;
}
$content .= "<br><center>[ <a href=\"article-topic-.html$mytopic\">"._MORENEWS."</a> ]</center>";

?>


Change the 1 in $mytopic = "1"; to the topic number of your choice.
View user's profile Send private message Visit poster's website
koun
New Member
New Member


Joined: Mar 01, 2004
Posts: 8

PostPosted: Mon May 24, 2004 6:09 pm Reply with quote Back to top

Works Fine !
You are simple the BEST!!!
Thanks
View user's profile Send private message
koun
New Member
New Member


Joined: Mar 01, 2004
Posts: 8

PostPosted: Tue Aug 03, 2004 1:03 am Reply with quote Back to top

I noticed that this script that Chatserv have posted in the past...
dont shows the last article from every categorie...
But i cant figure out what to change so this block will show the last article too...any ideas?
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum