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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-16-2007, 11:08 AM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 160
Thanks: 26
Thanked 1 Time in 1 Post
Long title/s spills over in the sidebar

Whenever a user posts a comment with a long url or if the characters of a word in a story exceed a certain amount, the comment/story title spill over the sidebar module and looks like this.



As you can see, the presentation looks quite sloppy and I was wondering if there's a way to wrap the comment/title?
Reply With Quote
  #2 (permalink)  
Old 09-16-2007, 12:16 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
I don´t know the file that corresponds to Top Today but this revision (SourceForge.net Repository - [pligg] Revision 1267) helped me with Upcoming News and Published News sidebar.
Reply With Quote
  #3 (permalink)  
Old 09-16-2007, 12:37 PM
sixlaneve's Avatar
Casual Pligger
 
Join Date: Dec 2006
Location: Rome
Posts: 81
Thanks: 7
Thanked 6 Times in 5 Posts
Send a message via ICQ to sixlaneve Send a message via AIM to sixlaneve
You have to change sidebar_stories.php and sidebar_stories_u.php, line 32

$ss->TitleLengthLimit = 30;

30 is the limit of character displayed, try with 20 or 25
Reply With Quote
  #4 (permalink)  
Old 09-16-2007, 09:41 PM
Designer
Pligg Version: 9.9.
 
Join Date: Mar 2007
Posts: 159
Thanks: 1
Thanked 15 Times in 11 Posts
Send a message via MSN to skins4webs
In addition, when you have a long line with no spaces the text will not wrap.
__________________
http://www.illestlyrics.com, hip-hop site
http://www.qkin.com, Web development site
Reply With Quote
  #5 (permalink)  
Old 09-17-2007, 03:32 AM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 160
Thanks: 26
Thanked 1 Time in 1 Post
thanks for the replies, but I don't see any $ss->TitleLengthLimit=30 in the sidebar_stories.php and sidebar_stories_u.php files. Is it OK if I add this line in these files? I'm using 9.7.
Here's how my sidebar_stories.php looks
Quote:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// affero.org: affero general public license
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
// -------------------------------------------------------------------------------------

include_once('Smarty.class.php');
if(!isset($main_smarty)){$main_smarty = new Smarty;}
// If we're calling this page through another page like index.php, $main_smarty will already be set
// If we're calling this page directly, set main_smarty

include_once('config.php');
include_once(mnminclude.'html1.php');
include_once(mnminclude.'link.php');
include_once(mnminclude.'tags.php');
include_once(mnminclude.'search.php');
include_once(mnminclude.'smartyvariables.php');
include_once(mnminclude.'sidebarstories.php');

global $the_template, $main_smarty;

// for filterTo you can use "published", "queued" or "all"
// to change the way the links look, edit /tempates/<your template>/sidebar_stories.tpl

$ss = new SidebarStories();
$ss->orderBy = "link_date DESC"; // newest on top.
$ss->pagesize = 5; // the number of items to show in the box.

if(pagename == "published"){
$ss->filterToStatus = "queued";
$ss->header = $main_smarty->get_config_vars("PLIGG_Visual_Pligg_Queued");
$ss->link = getmyurl("upcoming");
}
elseif(pagename == "upcoming"){
$ss->filterToStatus = "published";
$ss->header = $main_smarty->get_config_vars("PLIGG_Visual_Published_News");
$ss->link = my_base_url.my_pligg_base;
}
else{
$ss->filterToStatus = "published";
$ss->header = $main_smarty->get_config_vars("PLIGG_Visual_Published_News");
$ss->link = my_base_url.my_pligg_base;
}


if($the_template == "mollio-beat" || $the_template == "paul01") {

echo "<img src=minus.gif class=showstate onClick=expandcontent(this,'ss') /><h3>".$ss->header."</h3><div id=ss class=switchcontent>";
$ss->template = $the_template . '/sidebar_stories.tpl';
$ss->show();
echo "</div>";

}

elseif ($the_template == "digitalnature") {

echo "<div class=box><h1><span class=expand><a href=javascript:toggle('stories','expstories'); id=expstories class=expand-up></a></span><a href=javascript:toggle('stories','expstories');".$ ss->header."</a></h1><div class=box2 id=stories><div class=wrap><div class=content>";
$ss->template = $the_template . '/sidebar_stories.tpl';
$ss->show();
echo "</div></div></div></div>";

}

elseif ($the_template == "yget") {

echo "<div class=tlb><span><a onclick=\"new Effect.toggle('ssstories','blind', {queue: 'end'}); \"> <img src=\"".my_base_url.my_pligg_base."/templates/".The_Template."/images/expand.png\" /></a></span><a href=\"".$ss->link."\">".$ss->header."</a></div><div id=ssstories style=padding-bottom:2px>";
$ss->template = $the_template . '/sidebar_stories.tpl';
$ss->show();
echo "</div>";

}

else {

echo "<fieldset><legend><a href=\"".$ss->link."\">".$ss->header."</a></legend>";
$ss->template = $the_template . '/sidebar_stories.tpl';
$ss->show();
echo "</fieldset>";

}
?>
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
Sidebar Categories Enhancement AddOn AnAlienHolakres3 Modification Tutorials 65 08-30-2008 11:48 PM
Sidebar Friends Module with messaging and activity AnAlienHolakres3 Modification Tutorials 31 02-09-2008 06:54 AM
differents class for sidebar module lacasuela "yget" 5 01-21-2008 02:32 PM
Recreate functionality of origianl sidebar in added sidebar trustnot "Digital Nature" 1 03-15-2007 10:15 AM
sidebar shakeit issues davebowker General Help 2 11-01-2006 06:48 PM


Search Engine Friendly URLs by vBSEO 3.2.0