Not sure why, but the Topics moduel may have been modified so that when you click a topic, rather then it passing the varaible $new_topic to the News module, it now passes $topic. Unfortunately the News module is still expecting $new_topic so you lose the search function at the top of the page.
To fix, open the <root>/modules/News/index.php file, scroll to the very bottom and locate the default execution which looks like this,
Code:
default:
theindex($new_topic);
break;
change the $new_topic varaible to just $topic so it looks like the following and you'll get the search function back on the top of the page,
Code:
default:
theindex($topic);
break;
I only noticed this because I was adding my code to allow navigating through all articles in the topic, not just the last articles that $storynum equates to.
Added at 4pm: Viewing any Topic causes all topics to have their counter's increased. To prevent this and only have the viewed topic's counter increased, goto the sql_query at approximately line 57 in the theindex() function and add the WHERE comand to the end so that it looks like the following,
Code:
$db->sql_query("UPDATE ".$prefix."_topics SET counter=counter+1 WHERE topicid='$new_topic'");
Disregard the first portion of the fix above. Making that change then breaks it when clicking a topic from the main page. Some how when the 3.1 patch was released, the new_topic variables in the Topics module (index.php file) was changed to just topic.
To correct this, do a search and replace within the <root>/modules/Topics/index.php file for the following string
Code:
&topic
and replace it with the following string,
Code:
&new_topic
There will be two (2) instances within the above file, if you get more then two, double check what your searching for. I suspect that's how it was changed in the first place, with a mass search and replace, just guessing though. If it was changed because the author wanted topic rather then new_topic then the change would need to be done to both the Topic's and News modules.
Note: This and the above only apply when the 3.1 patch has been applied. No changes necessary on un-patched versions.
can you help me out of this ( show only last article of each
hi
i see you realy good in php and nuke ..
can you help me out of this project
i trying to modify the news modules of phpnuke to make it fress..
i wanna show up on homepages only the last article of each topics ( not some last artical of any topics ) and the links to its full containt , it similar like following:
-----------------------------------------------------|
*tittle of last artical of topic one |
-- this is contain of last article of topicone |
+link to full contain of article |
-----------------------------------------------------|
+link to second last article of topic one
+link to thirth last article of topic one
==============================
-----------------------------------------------------|
*tittle of last artical of topic two |
--this is contain of last article of topic two |
+link to full contain of article |
-----------------------------------------------------|
+link to second last article of topic two
+link to thirth last article of topic two
==============================
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