Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
3 posters
Page 1 of 1
Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
Technical Details
Forum version : #phpBB3
Position : Member
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
When the problem appeared : January 23rd, 2017
Forum link : http://zex-vietnam.forumvi.com
Description of problem
I've used the code from this tutorial but nothing happens. I'm sure I did exactly the same as what this post instructs.
Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
hello
maybe this will help you https://help.forumotion.com/t150484-collapsable-category#1037528
check @APE code
maybe this will help you https://help.forumotion.com/t150484-collapsable-category#1037528
check @APE code
Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
Sorry, but it does not help me solve my problemskouliki wrote:hello
maybe this will help you https://help.forumotion.com/t150484-collapsable-category#1037528
check @APE code

Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
what code do you have in your forum now ?
Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
It is showing, but not working correct. Collapsing the linklist lol
Try replacing it with this one:
Try replacing it with this one:
- Code:
/***
* Application: toggle Category
* Description: Show/hide categories!
* Version: 0.02632015-jq1.9.1
* RC1 (Release candidate 1!) - Invision
* Author: JScript - 2015/03/26 - based on Invision.js
* This work is free. You can redistribute it and/or modify it
* under the terms of the WTFPL, Version 2
*/
$(function() {
("JScript <jscriptbrasil at live dot com>, based on Invision.js");
var style = document.createElement("style"),
/* Versions:|phpBB3-------------| */
oCat = $('#content-container .three-col td:eq(1) .forumline, #main-content .forabg, #main-content .main-head'),
oThis = null,
oTemp = null,
sEval = '';
style.type = "text/css";
style.innerHTML =
'.contract, .expand {' +
' background: url("https://i68.servimg.com/u/f68/15/58/53/29/catego14.png") no-repeat scroll 50% 50% rgba(0, 0, 0, 0);' +
' cursor: pointer;' +
' float: right;' +
'}' +
'.expand {' +
' background: url("https://i68.servimg.com/u/f68/15/58/53/29/catego15.png") no-repeat scroll 50% 50% rgba(0, 0, 0, 0);' +
'}';
document.getElementsByTagName("head")[0].appendChild(style);
switch (oCat[0].className) {
case 'forabg': //phpBB3
sEval = "oThis.find('ul.topiclist:first dl.icon').append('<div onclick=\"toggleCategory(\\'c' + i + '\\');\" id=\"bc' + i + '\" class=\"contract\"> </div>');" +
"oThis.find('ul.topiclist.forums').attr('id', 'c' + i);";
break;
}
for (var i = 0, len = oCat.length; i < len; i++) {
oThis = $(oCat[i]);
eval(sEval);
}
initCategories();
});
// by invision.js
function initCategories() {
var id;
cookies = document.cookie.split('; ');
for (var i = 0; i < cookies.length; i++) {
if (cookies[i].charAt(0) == '_') {
cookie = cookies[i].split('=');
if (cookie[1] == '1') {
id = cookie[0].substring(1);
if (document.getElementById(id)) {
toggleCategory(id)
}
}
}
}
}
// by invision.js, modified by JScript
function toggleCategory(id) {
var obj = document.getElementById(id);
var button = document.getElementById('b' + id);
if (obj) {
var toggle = obj.style.display == 'none';
obj.style.display = toggle ? '' : 'none';
} else {
var elems = document.getElementsByClassName(id);
for (var i = 0, len = elems.length; i < len; i++) {
var toggle = elems[i].style.display == 'none';
elems[i].style.display = toggle ? '' : 'none';
}
}
button.className = toggle ? 'contract' : 'expand';
my_setcookie('_' + id, toggle ? '' : '1', true);
return false
}
Guest- Guest
Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
ok i see the problem you have changed to much on your templates for this to work.
It looks for key items in your templates to pick the right place to close and open.
so none of the codes we have here will work.
It looks for key items in your templates to pick the right place to close and open.
so none of the codes we have here will work.
Re: Category Toggle Code Does Not Work For My Forumotion PHPBB3 Forum
APE wrote:ok i see the problem you have changed to much on your templates for this to work.
It looks for key items in your templates to pick the right place to close and open.
so none of the codes we have here will work.
Do you have any solution for me, please?

I really like this toggle


» why the random bbc code it won't work on the forum??/
» Category toggle Script do not work..
» Will this work on phpbb3 (the code is from invision)
» Toggle Category for phpbb2 Forum.
» After going through the Category Toggle tutorial, no changes in my forum.
» Category toggle Script do not work..
» Will this work on phpbb3 (the code is from invision)
» Toggle Category for phpbb2 Forum.
» After going through the Category Toggle tutorial, no changes in my forum.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum