phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

dhtml look in index categories


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Mon Mar 02, 2009 2:29 pm 
Post subject: dhtml look in index categories

hi guys (and why not girls),, I need a mod to make the index categories feel DHTML'ed , I mean , that by clicking on cat name it collapse and expand like the dhtml menu acp mod do, and the faq dhtml mod do also, I tried to do it by my self based on those both mod but I failed icon_sad.gif , can anybody help ?
Back to top
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Tue Mar 03, 2009 3:22 am 
Post subject: Re: dhtml look in index categories

It should do that by default just click on the catagory name and all the other categories will collapse.

Pick a catagory to have open by default and use that as your index page address icon_biggrin.gif

To have all categories closed like dhmtl change the catagory number in the url to a higher number then the highest cat number available on you board.

For example If you have a catagory url of say..(seo mod)
www.yourdomain.com/bgeneral-b-c1.html

Change it to:
www.yourdomain.com/bgeneral-b-c111.html
in your browser address bar, then hit enter..

And all of your categories will close and you can use this as your default url and hook your domain name to it.

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Tue Mar 03, 2009 5:49 am 
Post subject: Re: dhtml look in index categories

thank you for your help tentaive icon_smile.gif but DHTML means it use java script and when click on a cat it collapse and expand without reloading the page (like in windows explorer) try installing dhtml faq mod and you'll have an idea ,,,
Back to top
Ram
Board Member



Joined: 23 Dec 2008

Posts: 100
Location: Somewhere over the rainbow


flag
PostPosted: Tue Mar 03, 2009 7:32 am 
Post subject: Re: dhtml look in index categories

DHTML Collapsible Forum Index MOD v1.1.1 icon_wink.gif
Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Tue Mar 03, 2009 10:48 am 
Post subject: Re: dhtml look in index categories

Thank you ram but can you give me a direct link, or can you upload it here cause i can't find how to download it from that site neither from phpbb.com
.
Back to top
Ram
Board Member



Joined: 23 Dec 2008

Posts: 100
Location: Somewhere over the rainbow


flag
PostPosted: Tue Mar 03, 2009 11:05 am 
Post subject: Re: dhtml look in index categories

Have fun icon_wink.gif


dhtml_collapsible_forum_index_mod_v1_1_1.zip
 Description:
DHTML Collapsible Forum Index

Download
 Filename:  dhtml_collapsible_forum_index_mod_v1_1_1.zip
 Filesize:  17.11 KB
 Downloaded:  497 Time(s)

Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Tue Mar 03, 2009 3:28 pm 
Post subject: Re: dhtml look in index categories

Oh yeah...Good to go
i really have fun
u gave me great services today ram. Thank you.
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Tue Mar 03, 2009 3:30 pm 
Post subject: Re: dhtml look in index categories

Have you noticed the category fold option we have on this site? It's quite simple, and requires only a small bit of javascript...
_________________
phpBBDoctor Blog
Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Tue Mar 03, 2009 8:01 pm 
Post subject: Re: dhtml look in index categories

oh druth no, i noticed nothing, coz i'm always using opera mini with mobile phone, so such effect won't work, icon_sad.gif , is it possible to have the mod using for what you talked about to test it on my devlevel board ?
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Wed Mar 04, 2009 7:29 am 
Post subject: Re: dhtml look in index categories

I am posting what I found on my archive; I am not completely sure it's exactly how it was implemented here. The original author name / email is on here, but I don't think he's around anymore, and certainly is not supporting this code. The basic concept is cool; you can click the category fold icon and it remains folded until you open it again. Unfortunately it's cookie based, so it doesn't follow you from one computer to another like it would if it were a database value. On the other hand, by using cookies it's available for guests and not just logged in members, so that's an advantage for the other side.
Code:
#################################################################
## Mod Title: Rollout Category Javascript Mod
## Mod Version: 1.2.3
## Author: mojavelinux <dan@mojavelinux.com> - Dan Allen - http://mojavelinux.com
## Description: This mod allows you to 'roll-up' your forums into
##              their catagories on the index page using javascript
##              and cookies (so 100% user preference)
## Installation Level: easy
## Installation Time: 1-3 Minutes
## Files To Edit: index.php,
##                index_body.tpl,
##                overall_header.tpl
## Included Files: rollout.js
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
##
## Now using cookies instead of any database, so this is just for the user to clean up clutter
##
## ChangeLog:
##
## {dgr}
##   Modified to fix errors / omissions, change style name to topicfold
##    changed cookie name
##
## Version 1.2.3
##   * had wrong version of rollout.js in 1.2.2
##
## Version 1.2.2
##   * introduced the use of cookies (remembers state for 1 year)
##   * cleaned up setup file a lot
##   * the MOD is actually useful now
##
## Version 1.2.1
##   * made the javascript much simpler and Netscape 6.x compliant
##   * made the HTML far simpler
##
## Known Issues:
##
## * None as of right now
##
############################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ##
############################################################################################

#
#-------- [ ADD FILE ] ------------------------
#
# (last updated 1.2.2)

rollout.js

#
#-------- [ OPEN ] ----------------------------
#
# (last update 1.2.2)

templates/subSilver/index_body.tpl

#
#-------- [ FIND ] ----------------------------
#
# ( Around Line 23 )

  <!-- BEGIN catrow -->
  <tr>

#
#-------- [ AFTER, ADD ] ----------------------
#

   
   <!-- start topicfold mod -->
   <td class="cat" height="28" align="center" width="50"><span class="topicfold" onClick="rollup_contract(this, 'foldcat_{catrow.CAT_ID}');">
   <!-- BEGIN switch_cat_on -->
   -
   <!-- END switch_cat_on -->
   <!-- BEGIN switch_cat_off -->
   +
   <!-- END switch_cat_off -->
   </span></td>
   <!-- stop topicfold mod -->

#
#-------- [ FIND ] -----------------------------
#

    <!-- BEGIN forumrow -->

#
#-------- [ BEFORE, ADD ] ----------------------
#

  <!-- BEGIN switch_cat_on -->
  <tbody id="foldcat_{catrow.CAT_ID}" style="display: ;">
  <!-- END switch_cat_on -->
  <!-- BEGIN switch_cat_off -->
  <tbody id="foldcat_{catrow.CAT_ID}" style="display: none;">
  <!-- END switch_cat_off --> 

#
#-------- [ FIND ] ------------------------------
#

  <!-- END forumrow -->

#
#-------- [ AFTER, ADD ] ------------------------
#

  </tbody>

#
#-------- [ OPEN ] ------------------------------
#

templates/subSilver/overall_header.tpl

#
#-------- [ FIND ] ------------------------------
#
# ( Around Line 223 )

/*
@import url(...)
-->
</style>

#
#-------- [ BEFORE, ADD ] -----------------------
#
# If this does not already exist

.topicfold {
    color: {T_BODY_TEXT};
    background-color: {T_TR_COLOR1};
    border: 1px solid {T_TH_COLOR1};
    width: 13px;
    height: 13px;
    padding: 1px 5px 1px 5px;
    font-family: Verdana, Tahoma, Arial, Sans-Serif;
    font-size: 7pt;
    border-style: solid;
    border-width: 1px;
    cursor: pointer;
    cursor: hand;
}

#
#-------- [ AFTER, ADD ] ------------------------
#

<script type="text/javascript" src="java/rollout.js"></script>

#
#-------- [ OPEN ] ------------------------------
#

index.php

#
#-------- [ FIND ] ------------------------------
#
# ( Around Line 306 )

                'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
            );

#
#-------- [ AFTER, ADD ] ------------------------
#

            $cat_on = !isset($HTTP_COOKIE_VARS['foldcat_' . $cat_id]) || !empty($HTTP_COOKIE_VARS['foldcat_' . $cat_id]) ? true : false;
            if( $cat_on )
            {
                $template->assign_block_vars('catrow.switch_cat_on', array());
            }
            else
            {
                $template->assign_block_vars('catrow.switch_cat_off', array());
            }

#
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
#
# EoM

The required javascript:
Code:
function rollup_contract(in_buttonSwitch, in_listID)
{
    if (document.getElementById) {
        listID = document.getElementById(in_listID);
    }
    else {
        return;
    }

    if (listID.style.display == '') {
        listID.style.display = 'none';
        in_buttonSwitch.innerHTML = '+';
        rollup_record_state(in_listID, 0);
    }
    else {
        listID.style.display = '';
        in_buttonSwitch.innerHTML = '-';
        rollup_record_state(in_listID, 1);
    }

    if (window.event) {
        window.event.cancelBubble=true;
    }
}

function rollup_record_state(in_listID, status)
{
    var expDate = new Date();
    // expires in 1 year
    expDate.setTime(expDate.getTime() + 31536000000);
    document.cookie = in_listID + "=" + escape(status) + "; expires=" + expDate.toGMTString();
}

_________________
phpBBDoctor Blog
Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Thu Mar 05, 2009 3:41 am 
Post subject: Re: dhtml look in index categories

ok, thanx, I'll see if it support subforum, coz the first one posted don't. and if so, i'll try to make it db based for users, coockie based for dear guests , euh, if it's GPL'd of course icon_wink.gif

edited :
ok, ti works 100% coz it just had no interference with thb subforum section in index_body.tpl
happy for that.
Thnx
Back to top
Daz
Board Member



Joined: 17 Dec 2008

Posts: 32
Location: Yorkshire, England


flag
PostPosted: Thu Mar 05, 2009 9:20 am 
Post subject: Re: dhtml look in index categories

Hi,

You may wish to change "cursor: hand" to "cursor: pointer" as some people don't use IE and IE (from version 6) supports the correct syntax.

Daz
Back to top
cherokee red
Board Member



Joined: 19 Nov 2008

Posts: 19
Location: Airdrie, UK


flag
PostPosted: Thu Mar 05, 2009 10:02 am 
Post subject: Re: dhtml look in index categories

It's probably not recommended, but I usually use both to make usre it works in all browsers icon_razz.gif
Code:
{
   cursor: hand;
   cursor: pointer;
}

_________________
phpBB MODs // My Music // Romance Designs :: coming soon
Former phpBB Moderator
Are you a musician in the Glasgow area interested in acoustic events? The ArtBox
Back to top
khofech
Board Member



Joined: 27 Feb 2009

Posts: 44



PostPosted: Thu Mar 05, 2009 12:02 pm 
Post subject: Re: dhtml look in index categories

it's already like you said cherokeeeee !!
Code:
cursos : pointer; cursor : hand;
, or hand should be written before cursor , let's say "order sensitive " ????
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Thu Mar 05, 2009 1:39 pm 
Post subject: Re: dhtml look in index categories

Daz wrote:
You may wish to change "cursor: hand" to "cursor: pointer" as some people don't use IE and IE (from version 6) supports the correct syntax.

Thanks for the tip, I'll have to see what I have set up on this site. That code is really old, as noted by the fact that it was written to support Netscape 6. icon_wink.gif

khofech, it's not clear if you were asking whether the MOD was GPL'd or not, but it certainly is. It's stated in the code that I posted.

_________________
phpBBDoctor Blog
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0249 seconds using 17 queries. (SQL 0.0026 Parse 0.0027 Other 0.0195)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo