I added treemenu to the blocks directory, editing as required for the navigation of my site, but it doesn't show up in the Block Administration page. Did I install incorrectly, or is there something else I need to do?
Also, is there a way, when posting a new News article, to define the categories able to be posted in depending upon the News Article/Section the user is viewing?
Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Fri Mar 28, 2008 7:51 am
It may have been better to ask your second question in a separate thread, but the answer is "no". That is not core *nuke functionality.
Regarding your first question, I have never used this, so am not familiar with the install. Please post a link to where we can get the the download for this block.
Okay. I didn't know if there was a place I might be able to edit the PHP to be able to limit the category sections depending on the section being viewed. Would you have a suggestion as to a module that might be capable of doing something like this? I really need to have sub-categories at least three levels deep. Hmmm... Just by re-reading that it looks like I'm going to have to try to design my own module. This is gonna suck...
Anyway, as for the Treemenu issue, I found it on this website:
Only registered users can see links on this board! Get registered or login to the forums!
Download link:
Only registered users can see links on this board! Get registered or login to the forums!
The install instructions say to expand the files in the blocks subdirectory and then activate the block in the admin panel. But when I look in the block admin section, it's not even listed. I've made my own blocks before and simply added it to the blocks subdirectory, and it showed up with no problem.
Could I possibly edit this bit of code from the index.php file in the Submit_News module:
Code:
echo '<b>'._TOPIC.':</b> <select name="topic">';
$result = $db->sql_query('SELECT topicid, topictext FROM '.$prefix.'_topics ORDER BY topictext');
echo '<option value="" selected="selected">'._SELECTTOPIC.'</option>';
while ($row = $db->sql_fetchrow($result)) {
$topicid = intval($row['topicid']);
$topics = stripslashes(check_html($row['topictext'], 'nohtml'));
echo '<option value="'.$topicid.'">'.$topics.'</option>';
}
echo '</select></p><p>';
But how would you tell it to present certain categories depending upon the page you came from? Some sort of POST value could be passed, correct?
Could you use something like:
Code:
echo '<b>'._TOPIC.':</b> <select name="topic">';
if ($topic == games|gamereviews|newreleases) {
$result = $db->sql_query('SELECT topicid, topictext FROM '.$prefix.'_topics WHERE topicid = games, gamereviews, newreleases ORDER BY topictext');
echo '<option value="" selected="selected">'._SELECTTOPIC.'</option>';
while ($row = $db->sql_fetchrow($result)) {
$topicid = intval($row['topicid']);
$topics = stripslashes(check_html($row['topictext'], 'nohtml'));
echo '<option value="'.$topicid.'">'.$topics.'</option>';
}
echo '</select></p><p>';
But even that would still leave the problem of passing the value $topic, which contains the topicid of the last viewed page, to the Submit_News index.php...
Okay, after reviewing things a bit, I see that I need to add a bit of code to the News index.php file to capture the currently viewed topic sid and pass that value via POST to the Submit_News script. Any suggestions as how to do this?
*EDIT* - Wait. Would I want to pass the variable $sid, $s_sid or $catid?
I solved the problem with the blank page. That was a stupid mistake, and I didn't have my debugging turned on. (DUH! )
As for my sub-category workaround, all I get on the Topic selection drop-down is the single checked 'Select Topic'.
Do I need to add $topicid to the globals?
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