IP.Board 2.3: Forums/subforums informations when close categories
Started by Adriano Faria, Oct 17 2008 10:18 AM
21 replies to this topic
#1
Posted 17 October 2008 - 10:18 AM
This is the support topic for the tutorial Forums/subforums informations when close categories. Please post here if you have any questions or feedback.
#2
Posted 24 February 2009 - 02:56 PM
I'm trying to go back and see what I've done wrong.
I seem to have made the categories collapsible without being able to re-open them. Could anyone guide me to my error?
-----
Edit;
Seems if I re-undo the tweaks it still comes up with my websites url/javascrpit but when i revert it becomes fine again.
I seem to have made the categories collapsible without being able to re-open them. Could anyone guide me to my error?
-----
Edit;
Seems if I re-undo the tweaks it still comes up with my websites url/javascrpit but when i revert it becomes fine again.
Edited by joey_matthews, 24 February 2009 - 03:21 PM.
#3
Posted 24 February 2009 - 03:16 PM
joey_matthews, on Feb 24 2009, 02:56 PM, said:
I'm trying to go back and see what I've done wrong.
I seem to have made the categories collapsible without being able to re-open them. Could anyone guide me to my error?
I seem to have made the categories collapsible without being able to re-open them. Could anyone guide me to my error?
you will need to post the code so someone can fault find it
~*~
~*~
Quote
95% of all installation errors are from not following the instructions correctly.
Click this link for information on common modification questions and errors
~*~
#4
Posted 24 February 2009 - 03:21 PM
RichardC, on Feb 24 2009, 11:16 AM, said:
<div class="borderwrap" style="display:{$data['div_fc']}" id="fc_{$data['id']}">
<div class="maintitlecollapse">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 0);"><{E_PLUS}></a></p>
<p><a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']}</a></p>
</div>
<div class="subtitlediv">
{$this->ipsclass->lang['topics']}: {$total['topics']} | {$this->ipsclass->lang['replies']}: {$total['posts']} | {$this->ipsclass->lang['last_post_info']}: <a title="{$this->ipsclass->lang['by']} {$total['last_poster_name']} {$this->ipsclass->lang['in']} {$this->ipsclass->get_date( $total['last_post'], 'LONG' )}" href="{$this->ipsclass->base_url}showtopic={$total['topics']}&view=getnewpost">{$total['last_title']}</a>
</div>
</div>
<div class="borderwrap" style="display:{$data['div_fo']}" id="fo_{$data['id']}">
<div class="maintitle">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 1);"><{E_MINUS}></a></p>
<p><{CAT_IMG}> <a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']}</a></p>
</div>
<table class='ipbtable' cellspacing="1">
<tr>
<th align="center" width="4%"></th>
<th colspan="2" width="66%">{$this->ipsclass->lang['cat_name']}</th>
<th style='text-align:center' width="7%">{$this->ipsclass->lang['topics']}</th>
<th style='text-align:center' width="7%">{$this->ipsclass->lang['replies']}</th>
<th width="35%">{$this->ipsclass->lang['last_post_info']}</th>
</tr>
Subheader code
<br />
<script type="text/javascript">
//<![CDATA[
// Set up img vars
var img_markers = {
'bc_new.gif' : 'bc_nonew.gif',
'bf_new.gif' : 'bf_nonew.gif',
'br_new.gif' : 'br_nonew.gif'
};
var regex_markers = 'bc_new.gif|bf_new.gif|br_new.gif';
//]]>
</script>
<script type="text/javascript" src="jscripts/ipb_forum.js"></script>
<div class="borderwrap" style="display:{$data['div_fc']}" id="fc_{$data['id']}">
<div class="maintitlecollapse">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 0);"><{E_PLUS}></a></p>
<p><a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']} {$this->ipsclass->lang['sub_forum_title']}</a></p>
</div>
<div class="subtitlediv">
{$this->ipsclass->lang['topics']}: {$total['topics']} | {$this->ipsclass->lang['replies']}: {$total['posts']} | {$this->ipsclass->lang['last_post_info']}: <a title="{$this->ipsclass->lang['by']} {$total['last_poster_name']} {$this->ipsclass->lang['in']} {$this->ipsclass->get_date( $total['last_post'], 'LONG' )}" href="{$this->ipsclass->base_url}showtopic={$total['topics']}&view=getnewpost">{$total['last_title']}</a>
</div>
</div>
<div class="borderwrap" style="display:{$data['div_fo']}" id="fo_{$data['id']}">
<div class="maintitle">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 1);"><{E_MINUS}></a></p>
<p><{CAT_IMG}> <a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']} {$this->ipsclass->lang['sub_forum_title']}</a></p>
</div>
<table class='ipbtable' cellspacing="1">
<tr>
<th align="center" width="4%"></th>
<th colspan="2" width="66%">{$this->ipsclass->lang['cat_name']}</th>
<th align="center" width="7%">{$this->ipsclass->lang['topics']}</th>
<th align="center" width="7%">{$this->ipsclass->lang['replies']}</th>
<th width="35%">{$this->ipsclass->lang['last_post_info']}</th>
</tr>
Thanks
Edited by joey_matthews, 24 February 2009 - 03:26 PM.
#5
Posted 24 February 2009 - 03:25 PM
may or may not be the issue, but java script should be javascript (one word) spell check the mod for that error. IPB seperates the word as a security measure.
~*~
~*~
Quote
95% of all installation errors are from not following the instructions correctly.
Click this link for information on common modification questions and errors
~*~
#6
Posted 24 February 2009 - 03:30 PM
Thank you very much Richard.
You was spot on
~Joey
You was spot on
~Joey
#7
Posted 24 February 2009 - 03:34 PM
IPB separates java script for security reasons.
#8
Posted 24 February 2009 - 09:34 PM
It seems it's not showing the stats.. any ideas what could be causing them not to show?
Just made a post and it didn't show when collapsed.
-edit-
It works fine with classic and not with pro, however I have a modded version of the pro theme and it works. (tried pasting the code from the modded version to the normal and it still didn't work)
Just made a post and it didn't show when collapsed.
-edit-
It works fine with classic and not with pro, however I have a modded version of the pro theme and it works. (tried pasting the code from the modded version to the normal and it still didn't work)
<div class="borderwrap" style="display:{$data['div_fc']}" id="fc_{$data['id']}">
<div class="maintitlecollapse">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 0);"><{E_PLUS}></a></p>
<p><a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']}</a></p>
</div>
<div class="subtitlediv">
{$this->ipsclass->lang['topics']}: {$total['topics']} | {$this->ipsclass->lang['replies']}: {$total['posts']} | {$this->ipsclass->lang['last_post_info']}: <a title="{$this->ipsclass->lang['by']} {$total['last_poster_name']} {$this->ipsclass->lang['in']} {$this->ipsclass->get_date( $total['last_post'], 'LONG' )}" href="{$this->ipsclass->base_url}showtopic={$total['topics']}&view=getnewpost">{$total['last_title']}</a>
</div>
</div>
<div class="borderwrap" style="display:{$data['div_fo']}" id="fo_{$data['id']}">
<div class="maintitle">
<p class="expand"><a href="java script:togglecategory({$data['id']}, 1);"><{E_MINUS}></a></p>
<p><a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']}</a></p>
</div>
<table class='ipbtable' cellspacing="0">
<tr>
<th align="center" width="4%"></th>
<th colspan="2" width="66%">{$this->ipsclass->lang['cat_name']}</th>
<th style='text-align:center' width="7%">{$this->ipsclass->lang['topics']}</th>
<th style='text-align:center' width="7%">{$this->ipsclass->lang['replies']}</th>
<th width="35%">{$this->ipsclass->lang['last_post_info']}</th>
</tr>
Edited by joey_matthews, 24 February 2009 - 09:51 PM.
#9
Posted 24 February 2009 - 09:53 PM
Please, double check your edits! If you look carefully at the screenshot on tutorial, you'll see that this tuto was made on Pro skin.
#10
Posted 24 February 2009 - 09:54 PM
Future reference for anyone else "$data="", $total=array()" keeps disappearing. Just had to re-add it and it works 
Sorry!
Sorry!
#11
Posted 24 February 2009 - 10:40 PM
Thanks adriano..
I've noticed that the links shown when collapsed that the links once clicked brings up the "out of date or removed error" same link for both :S
I've noticed that the links shown when collapsed that the links once clicked brings up the "out of date or removed error" same link for both :S
#12
Posted 25 February 2009 - 03:08 PM
There's an issue with the tutorial itself it appears, the link is creating a problem and isn't actually locating the correct link. Every link when the sections closed points to the same number and not the right topic..
How is this resolved?
How is this resolved?
#13
Posted 25 February 2009 - 03:09 PM
There's no problem with turorial... Tested again and it works! I'm sorry but if it don't works for you, simply don't use it!
What can I do ? Double check your edits! Did you put together JAVA SCRIPT as RichardC told above ?
What link are you talking about ? Category "A Test Category" on this screenshot ?
imagem.PNG 5.67K
0 downloads
When I click, open the category:
imagem.PNG 7.5K
0 downloads
That's the only link on this tuto...
What do you mean when you that's not the correct link ?
What can I do ? Double check your edits! Did you put together JAVA SCRIPT as RichardC told above ?
What link are you talking about ? Category "A Test Category" on this screenshot ?
imagem.PNG 5.67K
0 downloadsWhen I click, open the category:
imagem.PNG 7.5K
0 downloadsThat's the only link on this tuto...
What do you mean when you that's not the correct link ?
#14
Posted 25 February 2009 - 03:26 PM
SOSInvision, on Feb 25 2009, 10:09 AM, said:
There's no problem with turorial... Tested again and it works! I'm sorry but if it don't works for you, simply don't use it!
What can I do ? Double check your edits!
What link are you talking about ? Category "A Test Category" on this screenshot ?
imagem.PNG
When I click, open the category:
imagem.PNG
That's the only link on this tuto.. What happens when I click there ? Opens that category! What do you mean when you that's not the correct link ?
What can I do ? Double check your edits!
What link are you talking about ? Category "A Test Category" on this screenshot ?
When I click, open the category:
That's the only link on this tuto.. What happens when I click there ? Opens that category! What do you mean when you that's not the correct link ?
Quote
There doesn't appear to be anything wrong with the code you pasted into your post (when I compare it with the tutorial's). However, if you look at the link to a topic, for example the "Hello" topic, the link says "&showtopic=5", whereas when you collapse it, the link says "&showtopic=1", which obviously isn't right.
The problem is actually the modification itself (as far as I can tell). Basically, $total['topics'] (which is used to generate the link to the topic), is only counting the number of topics in the category, not the actual ID of which one it should be linking to.
The ID of "Hello" is 5, but there is only one topic in the category. So rather than linking to topic 5, it's counting the number of topics (which is 1), and then linking to the topic with an ID of 1 (which doesn't exist).
As for how to fix this, to be quite honest I don't have a clue (Hopefully someone else will though). But as far as I can tell that's what is causing the problem for you.
The problem is actually the modification itself (as far as I can tell). Basically, $total['topics'] (which is used to generate the link to the topic), is only counting the number of topics in the category, not the actual ID of which one it should be linking to.
The ID of "Hello" is 5, but there is only one topic in the category. So rather than linking to topic 5, it's counting the number of topics (which is 1), and then linking to the topic with an ID of 1 (which doesn't exist).
As for how to fix this, to be quite honest I don't have a clue (Hopefully someone else will though). But as far as I can tell that's what is causing the problem for you.
Basically for some reason it's not working, all I'm simply asking is could there be a logic reason behind it? Not to speak out of line but your responses are rash and appear moody, I honestly appreciate the work gone into providing this tweak and the support itself but it's not helpful telling someone unfamiliar with code to go and re-check it every time. I have no coding experience and understand that you may not know, though you should have a clue to what might be causing it.
I've even provided my edits and since it's just the post url once minus I would of assumed it was simple.
~Joey
P.s I'm sorry that you fell that, all I'm trying to do is use the edit. If I can't resolve it the only option is to not use it but I would like to see what could be causing it first. (otherwise it's a complete waste of time) Thanks
#15
Posted 25 February 2009 - 04:52 PM
joey_matthews, on Feb 24 2009, 09:54 PM, said:
Future reference for anyone else "$data="", $total=array()" keeps disappearing. Just had to re-add it and it works 
Sorry!
Sorry!
Ive seen this problem before, it sometimes depends whether you physically click the 'save' button with your mouse, or just press 'enter' on the keyboard, as a routine, I do both and also save the template bit each time.
Not sure what your current problem is (and I have not read through the topic), but I would go back and double check all the required data variables have been stored and also try rebuilding your skin cache (ACP > look and feel > skin tools > Rebuild Skin Set Cache > 'your skin' > run tool ) - this had resolved issues many many times for people
regards
Richard
~*~
~*~
Quote
95% of all installation errors are from not following the instructions correctly.
Click this link for information on common modification questions and errors
~*~
#16
Posted 25 February 2009 - 11:24 PM
Ah thanks Richard.
Just tried that, without success. all variables are correct. Looks like I will have to remove it
~Joey
Appreciated the support, thanks for that!
Just tried that, without success. all variables are correct. Looks like I will have to remove it
~Joey
Appreciated the support, thanks for that!
#17
Posted 26 February 2009 - 12:34 PM
Joey's problem appears to be:
When you click on the 'Last post XXXXXXXXXXXXXXX', it is bringing up 'Sorry, the link that brought you to this page seems to be out of date or broken.'
When you click on the 'Last post XXXXXXXXXXXXXXX', it is bringing up 'Sorry, the link that brought you to this page seems to be out of date or broken.'
#18
Posted 26 February 2009 - 12:43 PM
rich505, on Feb 26 2009, 09:34 AM, said:
Joey's problem appears to be: When you click on the 'Last post XXXXXXXXXXXXXXX', it is bringing up 'Sorry, the link that brought you to this page seems to be out of date or broken.'
imagem.PNG 65.7K
0 downloadsRed arrow is mouse over the link.
Blue arrow is the link on status bar. The link is the same when cat is open: index.php?showtopic=XX&view=getnewpost, where XX is the topic ID.
The path is ok. When I click, open the new post of that topic.
#19
Posted 26 February 2009 - 12:45 PM
Not for Joey it isn't, you click on the links on his board and get the above error.
I know what I'm seeing!
http://www.poetryartonline.com/forums/ try it for yourself.
I know what I'm seeing!
http://www.poetryartonline.com/forums/ try it for yourself.
#20
Posted 26 February 2009 - 12:54 PM
It's something else!
See this example: http://www.poetryart...php?showtopic=2
This topic does not exists in his board!
On P&A! Together category, he got 2 topics, in 2 differents IDs: Topics ID 6 & 8.
When the cat is collapsed, shows topic ID 2: http://www.poetryart...view=getnewpost
Should be ID = 8!!!
EDIT: found the error!
It's showing the total topics... not the last ID. I was only testing on fresh install, with only 1 topic.. that's why always works!
Will edit the tuto ASAP.
Sorry, joey_matthews!
See this example: http://www.poetryart...php?showtopic=2
This topic does not exists in his board!
On P&A! Together category, he got 2 topics, in 2 differents IDs: Topics ID 6 & 8.
When the cat is collapsed, shows topic ID 2: http://www.poetryart...view=getnewpost
Should be ID = 8!!!
EDIT: found the error!
Quote
<a title="{$this->ipsclass->lang['by']} {$total['last_poster_name']} {$this->ipsclass->lang['in']} {$this->ipsclass->get_date( $total['last_post'], 'LONG' )}" href="{$this->ipsclass->base_url}showtopic={$total['topics']}&view=getnewpost">{$total['last_title']}</a>
Will edit the tuto ASAP.
Sorry, joey_matthews!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





Contributor










