Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2007, 09:46 AM
New Pligger
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
Lightbulb Left and right sidebar for Pligg 9.6

Hi,

This a tutorial to install a left sidebar to Pligg 9.6, so you will have a right and a left sidebar.

First, I would like to apologize for my bad English. I hope everyone will understand me.
Second, I very new to Pligg. I have discover it 3 days ago, so I'm not sure this is the good way to proceed.

No warranty, test at your own risk.

---

In this example, we will move the "categories" and the "top 5 tags" to the right sidebar.

Step 1:
Go to the "templates/" folder and make a backup copy of the "yget/" folder.
In the "yget/" folder, make a copy of "sidebar.tpl" file. Rename this copy "left_sidebar.tpl".
Open this file, and remove unwanted lines. The content sould be :
Code:
				{config_load file="/libs/lang.conf"}

{checkActionsTpl location="tpl_sidebar_top"}

{assign var=sidebar_module value="categories"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}

{if $Enable_Tags eq 'true'} {assign var=sidebar_module value="tags"}{include file=$the_template_sidebar_modules."/wrapper.tpl"} {/if}
Save & close the file.

Step 2 :
Open the "sidebar.tpl" file.
Remove the lines :
Code:
{assign var=sidebar_module value="categories"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}
and
Code:
{if $Enable_Tags eq 'true'} {assign var=sidebar_module value="tags"}{include file=$the_template_sidebar_modules."/wrapper.tpl"} {/if}
Save & close the file.

Step 3 :
Open the "pligg.tpl" file and at line 80, add :
Code:
<div id="left_sidebar">
  {if $pagename neq "editor"}{include file=$tpl_left_sidebar.".tpl"}{/if}
</div><!-- left_sidebar end -->
Save & close the file.

Step 4 :
In the folder "libs/", make a backup copy of "smartyvariables.php".
Open the file "smartyvariables.php".
At line 47, add :
Code:
$main_smarty->assign('tpl_left_sidebar', $the_template . '/left_sidebar');
Save & colse the file.

Step 5 :
As we have now two sidebars, we have to adjust the CSS.
In the folder "templates/yget/css/", make a backup copy of "main.css".
Open the "main.css" file.
To expand the space, replace the line 3 with :
Code:
body {padding:0 0 20px;background:#fff;color:#333;font:83%/1.5 arial,tahoma,verdana,sans-serif;margin:0 auto; width:95%} /* IE doesn't support min/max-width, so this doesn't work for IE folks */
Let make the right side bar smaller. Replace line 7 by :
Code:
#sidebar {position:absolute;top:0px;left:auto;right:0px;width:180px;}
Replace line 112 by (unfortunaltly, this does not seem to work with IE6) :
Code:
.featurebox li.rmore {list-style:none; margin-left:90px;background:url("../images/more.png") no-repeat 100% 100%;}
Now, we increase the centre space. Replace line 8 by :
Code:
#contentbox { margin-left:200px;margin-right:200px;width:100%;}
Finally, we add the left bar properties. Add at line 8 :
Code:
#left_sidebar {position:absolute;top:0px;left:0px;right:auto;width:180px;}
Save & exit.

Step 6 :
Launch Pligg, you should have two sidebars.
Login as Admin, go to "Admin/Temple Editor" panel.
Open "left_sidebar.tpl", and click on "Save Changes".
Do the same for "sidebar.tpl".

Step 7 :
...
At this point the job job is not quite finished.
As you can see, some background images needs to be adjust, and there are some more job to do on the CSS.
But this should be a good starting point for a 2 sidebars Pligg ...

---

Hope, I have not forget anything.
It has been tested under windows XP with Wamp (php 4.4.7, mysql 5) + Firefox + Pligg 9.6.

Have fun.
JPR75
Reply With Quote
The Following 2 Users Say Thank You to JPR75 For This Useful Post:
  #2 (permalink)  
Old 12-18-2007, 12:03 PM
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: custom yget
 
Join Date: Jun 2007
Location: Colorado
Posts: 56
Thanks: 10
Thanked 0 Times in 0 Posts
I've tried to make this modification to a yget template in ver 9.8.2

I didn't notice anything making calls to upcoming_center.tpl but I get this error:

Code:
Fatal error: TPL: [in line 0]: syntax error: file 'lrorange/upcoming_center.tpl' does not exist in /home/runr1/public_html/w2news/class.template.php on line 923
I have a huge categories list and would like to add a left sidebar to accommodate the length.

Any ideas on what I'm missing?
Reply With Quote
  #3 (permalink)  
Old 12-20-2007, 05:25 PM
Casual Pligger
Pligg Version: 9.8.2
Pligg Template: custom yget
 
Join Date: Jun 2007
Location: Colorado
Posts: 56
Thanks: 10
Thanked 0 Times in 0 Posts
Fixed.

Copied upcoming_center.tpl from ver 9.1 in template directory ver 9.8.2

No apparent issues.
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

Search Engine Friendly URLs by vBSEO 3.2.0