Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support > Old Templates > "Digital Nature"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-01-2007, 10:48 AM
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Thanks: 8
Thanked 12 Times in 6 Posts
Question How to add additional sidebarfx boxes?

I've searched with no success on how to add additional sidebar boxes using the hide/un-hide function. Can anyone give me a clue where I need to be looking?

I added a new entry to the sidebarfx.js file (copy and pasting another entry and changing the variables to match the new sidebar box). I've also added the sidebar box no problem... the AJAX mobility works fine, but it does not hide when clicked.

The site is : www.haohaoreport.com

Cheers for any help anyone can provide.
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
  #2 (permalink)  
Old 01-01-2007, 10:21 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Take a look at at the files in /digitalnature/sidebar_modules/

<h1><span class="expand"><a id="expcat" class="expand-up"></a></span><a class="htitle">Your title text here</a></h1>

Add that to your sidebar module and just make sure to change the "id" from "expcat" to something else and that should do it.
__________________
- Ash
Reply With Quote
  #3 (permalink)  
Old 01-01-2007, 11:04 PM
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Thanks: 8
Thanked 12 Times in 6 Posts
Unhappy no luck

Hey Ash, thanks for the reply... but that doesn't work. For whatever reason, it was designed so that you have to add additional entries into the sidebarfx.js to get it to work - unfortunately, I am missing something as I've changed everything I can see ... but it's not working.

This is the original per-item code in the JaveScript file (digitalnature/js/sidebarfx.js) - each sidebar element has one of these:
Code:
'#rssbox h1' : function(el){
	el.onclick = function(){
		if (Element.hasClassName(this, 'invisible')) {
			new Effect.BlindDown('rss', {duration:0.3});
			Element.removeClassName(this, 'invisible');
			document.getElementById('exprss').className='expand-down';						
			setCookie(this.parentNode.id, '', 365);

		} else {
			new Effect.BlindUp('rss', {duration:0.3});
			Element.addClassName(this, 'invisible');
			document.getElementById('exprss').className='expand-up';						
			setCookie(this.parentNode.id, 'invisible', 365);
		}
	}		
},
I took this and modified it to this (adding a "Partners" sidebar box):
Code:
'#ptnrbox h1' : function(el){
	el.onclick = function(){
		if (Element.hasClassName(this, 'invisible')) {
			new Effect.BlindDown('ptnr', {duration:0.3});
			Element.removeClassName(this, 'invisible');
			document.getElementById('expptnr').className='expand-down';						
			setCookie(this.parentNode.id, '', 365);

		} else {
			new Effect.BlindUp('ptnr', {duration:0.3});
			Element.addClassName(this, 'invisible');
			document.getElementById('expptnr').className='expand-up';						
			setCookie(this.parentNode.id, 'invisible', 365);
		}
	}		
},
I then adjusted the array later in the file:
Code:
/ Id names of all the "boxes"
boxIds = $("rssbox","tagbox","categorybox","loginbox","sidenavbox","aboutbox");
to
Code:
// Id names of all the "boxes"
boxIds = $("rssbox","ptnrbox","tagbox","categorybox","loginbox","sidenavbox","aboutbox");
In the sidebar_modules directory I created a file called ptnr.tpl with the following code:
HTML Code:
<li>
  <div class="box" id="ptnrbox">
    <h1><span class="expand"><a id="expptnr" class="expand-up"></a></span><a class="htitle">Partners</a></h1>
    Our partners....
  </div>
</li> 
And I added the following line to the sidebar.tpl file:
Code:
{assign var=sidebar_module value="ptnr"}{include file=$the_template_sidebar_modules."/wrapper2.tpl"}
Anyone any ideas what else I need to do to get this to work?
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
The Following 2 Users Say Thank You to The Humanaught For This Useful Post:
  #4 (permalink)  
Old 01-01-2007, 11:15 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Ahhh, I had no idea it was that complex.

Try this for ptnr.tpl

PHP Code:
<li>
  <
div class="box" id="ptnrbox">
    <
h1><span class="expand"><a id="expptnr" class="expand-up"></a></span><class="htitle">Partners</a></h1>
      <
div class="box2" id="ptnr">
                
Our partners....
            </
div>
  </
div>
</
li
All I did was add

PHP Code:
<div class="box2" id="ptnr"
and

PHP Code:
</div
__________________
- Ash
Reply With Quote
The Following 2 Users Say Thank You to AshDigg For This Useful Post:
  #5 (permalink)  
Old 01-02-2007, 11:30 AM
New Pligger
 
Join Date: Dec 2006
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
I've got the same problem and tried a lot of ways that didn't work :S

Edit: with your instructions, Humanaught, now works!

Last edited by Sergio; 01-02-2007 at 11:39 AM..
Reply With Quote
  #6 (permalink)  
Old 03-15-2007, 10:37 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
This was a very helpful thread, I was able to get a mod that displays top stories to actually look like all of the other mods in the sidebar, however, I cannot get it to collapse.

Any suggestion?


Geoserv
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add additional URL's to Header paulgreco General Help 4 03-27-2008 02:57 PM
it is a way to add additional exclamation to news ? lacasuela General Help 1 02-07-2008 07:05 AM
Collecting additional user info during signup aaronpais General Help 3 05-25-2007 12:51 PM
Any additional downloads required if I am hosting in virtual dedicated environment? aaronpais Installation and Upgrade Help 0 05-12-2007 11:28 AM
Collapsible Boxes in sidebar mollyfud "yget" 3 02-15-2007 11:40 AM


Search Engine Friendly URLs by vBSEO 3.2.0