PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
rafamp
Regular
Regular


Joined: Oct 15, 2005
Posts: 92
Location: Brazil

PostPosted: Sun Nov 06, 2005 6:36 pm Reply with quote Back to top

hi

do you guys have a block/module/rss feed to know the last encyclopedia entries?

thanks
View user's profile Send private message MSN Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Nov 06, 2005 7:12 pm Reply with quote Back to top

I haven't seen this, but you could probably modify a similar last block to look at the encyclopedia table...
View user's profile Send private message
rafamp
Regular
Regular


Joined: Oct 15, 2005
Posts: 92
Location: Brazil

PostPosted: Tue Nov 08, 2005 2:20 pm Reply with quote Back to top

trying this without success

source: block-Last_5_Articles.php

Code:
if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}

global $prefix, $db;

$sql = "SELECT tid, title FROM ".$prefix."_encyclopedia ORDER BY id DESC LIMIT 0,10";
$result = $db->sql_query($sql);
while (list($tid, $title) = $db->sql_fetchrow($result)) {
$id = intval($tid);
$title = stripslashes($title);
  $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Encyclopedia&amp;rop=content&amp;tid=$id\">$title</a><br>";
}

?>
View user's profile Send private message MSN Messenger
rafamp
Regular
Regular


Joined: Oct 15, 2005
Posts: 92
Location: Brazil

PostPosted: Tue Nov 15, 2005 4:04 pm Reply with quote Back to top

Come on guys...
View user's profile Send private message MSN Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Nov 15, 2005 6:02 pm Reply with quote Back to top

What happens? Do you get an error message?
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Nov 15, 2005 6:13 pm Reply with quote Back to top

Did you post the entire code for the block? It's missing a <?PHP to start...
View user's profile Send private message
rafamp
Regular
Regular


Joined: Oct 15, 2005
Posts: 92
Location: Brazil

PostPosted: Tue Nov 15, 2005 6:21 pm Reply with quote Back to top

yes there is the <?PHP i just removed it and the comments to get smaller here in the forum,

the problem is when i exchange it, nothing happens Sad
View user's profile Send private message MSN Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Nov 15, 2005 6:27 pm Reply with quote Back to top

Try this (notice it's using a different table, the tid field is specified consistently in the SQL and the list result, the op code is correct in the URL):
Code:
<?php
if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}

global $prefix, $db;

$sql = "SELECT tid, title FROM ".$prefix."_encyclopedia_text ORDER BY tid DESC LIMIT 0,10";
$result = $db->sql_query($sql);

while (list($tid, $title) = $db->sql_fetchrow($result)) {
   $id = intval($tid);
   $title = stripslashes($title);
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Encyclopedia&amp;op=content&amp;tid=$id\">$title</a><br>";
}

?>
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