moving the forums with javascript
3 posters
Page 1 of 1
moving the forums with javascript
I have code in java script, had the css but I lost so please if you could help me to write the CSS code?
here is the script for phpbb3 forums...select in all pages
help me and sorry for bad English
here is the script for phpbb3 forums...select in all pages
- Code:
$(function(){$(function(){save=true;safe=true;show=["slideDown",500];hide=["slideUp",500];event="click";defaut=add("cel forum");add("diskusija",[1]);add("novosti",[2]);add("kardshering",[4]);add("klucevi",[5]);add("Design",[6]);add("Informática",[7]);add("Entretenimento",[8]);add("Ocultar tudo",[10]);conteneur_tabs("before",".cat-table:first")});$(function(){var a;if(save&&window.localStorage&&(a=localStorage.getItem("tabs"))&&(a=u(a)))defaut=a;$(".cat-table").filter(function(a){return!z(defaut,a)}).hide();for(a=0;a<v.length;a++)$(".cat-tabs").append('<div class="ct-item'+(v[a]==defaut?" ct-active":"")+'">'+(safe?v[a][0].replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):v[a][0])+"</div>");$(".cat-tabs").on(event,".ct-item",function(){$(".cat-tabs .ct-active").removeClass("ct-active");var a=$(this).parent().children().index(this);$(".cat-tabs").each(function(){$(this).children().eq(a).addClass("ct-active")});var c=v[a];$(".cat-table").not($(".cat-table").filter(function(a){return z(c,a)})[show[0]](show[1]))[hide[0]](hide[1]);save&&window.localStorage&&localStorage.setItem("tabs",JSON.stringify(c))})});var hide,show,save,safe,event,timeslide,defaut,v=[],w=["th.secondarytitle","div.table-title h2","div.page-title h2","div.maintitle h2"],x=["table","div.forabg","div.main-head","div.borderwrap"],y=[null,null,"div.main-content",null],ver=function(){return $("#phpbb").length?1:$("#pun-intro").length?2:$("#ipbwrapper").length?3:0},add=function(a,b){if(1==arguments.length)if("number"==typeof a)if(0<=a&&$(w[ver()]).length>=a+1)a=$(w[ver()]).eq(b=a).text();else return;else if("string"==typeof a)for(var b=[],c=0;c<$(w[ver()]).length;c++)b.push(c);v.push([a,"number"==typeof b?[b]:b]);return v[v.length-1]},u=function(a){for(var b=0;b<v.length;b++)if(JSON.stringify(v[b])==a)return v[b];return!1},conteneur_tabs=function(a,b){$(b)[a]('<div class="cat-tabs"></div>')},z=function(a,b){for(var c=0;c<a[1].length;c++)if(a[1][c]==b)return!0;return!1};$(w[ver()]).closest(x[ver()]).each(function(){$(this).add(y[ver()]).wrapAll('<div class="cat-table" />')})});
help me and sorry for bad English
Re: moving the forums with javascript
Hi Macedonia,
Searching for toogle categories BB3?
Searching for toogle categories BB3?
enlil wrote:hi,
an example of script to use on index :And the css :
- Code:
$(function() {
$("div.table-title").closest("div.forabg").addClass("cat-table").first().before('<div id="cat-tabs"></div>');
$(".cat-table:not(:first)").hide();
$("div.table-title h2").each(function() {
$("#cat-tabs").append('<div class="ct-item">' + $(this).text() + "</div>")
});
$("#cat-tabs .ct-item").click(function() {
$("#cat-tabs .ct-abled").removeClass("ct-abled");
$(this).addClass("ct-abled");
$(".cat-table").not($(".cat-table").eq($("#cat-tabs .ct-item").index(this)).slideDown(500)).slideUp(500)
}).first().addClass("ct-abled")
});you can improve the css. on this forum it looks like this :
- Code:
#cat-tabs { text-align: center; margin: 10px auto; }
#cat-tabs .ct-item { display: inline; background: blue; color: #fff; margin: 5px; padding: 5px; }
#cat-tabs .ct-abled { color: blue; background: #fff; }
otherway, to my taste it's bad to do this ( you need to browse all category to see new messages )
Nera.- Energetic
- Posts : 7078
Reputation : 2017
Language : English
Location : -
Re: moving the forums with javascript
dejanpetrus wrote:Thank Nera but if you can my script code put
Put the first code in your JavaScript code, my friend.
ACP > Modules tab > JavaScript code management.
DarkGlow- Forumember
- Posts : 629
Reputation : 92
Language : English | Hebrew | Arabic
Location : Israel
Re: moving the forums with javascript
that's true but it works well.I need a css code
mkd-satelite.forummk.com
mkd-satelite.forummk.com
Similar topics
» Moving User Avatars with JavaScript
» The moving of sub forums within a single category~
» Javascript is completely broken in the forums...
» moving this
» New : SSL certificates are now available for Forumotion forums + Possibility to run forums in HTTPS
» The moving of sub forums within a single category~
» Javascript is completely broken in the forums...
» moving this
» New : SSL certificates are now available for Forumotion forums + Possibility to run forums in HTTPS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum