The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Minimize Option and Smaller font on category

3 posters

Go down

Minimize Option and Smaller font on category  Empty Minimize Option and Smaller font on category

Post by DeathDunk98* April 1st 2014, 11:22 pm

Minimize Option and Smaller font on category  Untitl47
DeathDunk98*
DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by Pizza Boi April 2nd 2014, 10:36 am

Hi Very Happy

For #1, check out this tutorial: http://www.avacweb.com/t1368-category-toggler

For #2, phpBB2 is so general that declaring ID's for it is starting to get annoying... you are talking about making "Topics and Posts" smaller, right? The arrow is confusing. Anyway, find this in your index_box (In the general templates)

Code:
<th nowrap="nowrap" width="120">Topics and Posts</th>

And replace it with:

Code:
<th nowrap="nowrap" width="120" class="tp22">Topics and Posts</th>

Then save and publish. Now go to your CSS and paste this before saving:

Code:
.tp22 {
font-size: #px; /* Adjust it to the font-size you wanted */
}
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by SLGray April 2nd 2014, 10:37 am

1.  If you are using phpBB 2, that tutorial will not work.

Sorry I thought you were linking to the one on the support forum.


Minimize Option and Smaller font on category  Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by DeathDunk98* April 2nd 2014, 10:51 am

Pizza boi, it's not working, the font size making it smaller!
DeathDunk98*
DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by Pizza Boi April 2nd 2014, 10:54 am

Hi Very Happy

SLGray wrote:1.  If you are using phpBB 2, that tutorial will not work.

Sorry I thought you were linking to the one on the support forum.

It's no problem.

andiikadriu wrote:Pizza boi, it's not working, the font size making it smaller!

Please post your index_box found in your template then.

Edit: You did not answer my question, are you trying to make "Topics and Posts" smaller before I do some editing in the templates.

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by DeathDunk98* April 2nd 2014, 10:58 am

Yes I do want to make my Topics - Posts smaller !!!
Here's my index box :
Code:
    <!-- BEGIN catrow --><!-- BEGIN tablehead --><table class="forumline forumline_catg" width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
     
        <th nowrap="nowrap" width="120" class="tp22">Topics and Posts</th>
      <th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></th>
  </tr>
  <!-- END tablehead -->
  <!-- BEGIN cathead -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
        <h{catrow.cathead.LEVEL} class="hierarchy">
            <span class="cattitle">
              <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
            </span>
        </h{catrow.cathead.LEVEL}>
      </td>
      <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
  </tr>
  <!-- END cathead -->
  <!-- BEGIN forumrow -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.forumrow.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" alt="." /></td>
      <!-- END inc -->
      <td class="{catrow.forumrow.INC_CLASS}" align="center" valign="middle">
        <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
      </td>
      <td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">
        <h{catrow.forumrow.LEVEL} class="hierarchy">
            <span class="forumlink">
              <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
            </span>
        </h{catrow.forumrow.LEVEL}>
        <span class="genmed">{catrow.forumrow.FORUM_DESC}</span>
        <span class="gensmall">
            <!-- BEGIN switch_moderators_links -->
            {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
            <!-- END switch_moderators_links -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
        </span>
      </td>
      <td class="row3" align="center" valign="middle" height="50">
        <span class="gensmalxl">{catrow.forumrow.TOPICS} Topics</span>
                  <div class="gensmalxl">{catrow.forumrow.POSTS} Posts</div>
      </td>
     
      <td class="row3 over" align="center" valign="middle" height="50">
        <div class="growx">{catrow.forumrow.LAST_POST}</div>
             
      </td>
  </tr>
  <!-- END forumrow -->
  <!-- BEGIN catfoot -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
  </tr>
  <!-- END catfoot -->
  <!-- BEGIN tablefoot -->
</table><img src="{SPACER}" alt="" height="5" width="1" /><!-- END tablefoot --><!-- END catrow -->
DeathDunk98*
DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by Pizza Boi April 2nd 2014, 11:02 am

Hi Very Happy

Please replace your index_box with this (Save and publish)

Code:
    <!-- BEGIN catrow --><!-- BEGIN tablehead --><table class="forumline forumline_catg" width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
     
        <th nowrap="nowrap" width="120" class="tp22">Topics and Posts</th>
      <th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></th>
  </tr>
  <!-- END tablehead -->
  <!-- BEGIN cathead -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
        <h{catrow.cathead.LEVEL} class="hierarchy">
            <span class="cattitle">
              <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
            </span>
        </h{catrow.cathead.LEVEL}>
      </td>
      <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
  </tr>
  <!-- END cathead -->
  <!-- BEGIN forumrow -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.forumrow.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" alt="." /></td>
      <!-- END inc -->
      <td class="{catrow.forumrow.INC_CLASS}" align="center" valign="middle">
        <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
      </td>
      <td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">
        <h{catrow.forumrow.LEVEL} class="hierarchy">
            <span class="forumlink">
              <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
            </span>
        </h{catrow.forumrow.LEVEL}>
        <span class="genmed">{catrow.forumrow.FORUM_DESC}</span>
        <span class="gensmall">
            <!-- BEGIN switch_moderators_links -->
            {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
            <!-- END switch_moderators_links -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
        </span>
      </td>
      <td class="row3" align="center" valign="middle" height="50">
        <span class="gensmalxl" id="tp22">{catrow.forumrow.TOPICS} Topics</span>
                  <div class="gensmalxl" id="tp23">{catrow.forumrow.POSTS} Posts</div>
      </td>
     
      <td class="row3 over" align="center" valign="middle" height="50">
        <div class="growx">{catrow.forumrow.LAST_POST}</div>
             
      </td>
  </tr>
  <!-- END forumrow -->
  <!-- BEGIN catfoot -->
  <tr>
      <!-- BEGIN inc -->
      <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
      <!-- END inc -->
      <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
  </tr>
  <!-- END catfoot -->
  <!-- BEGIN tablefoot -->
</table><img src="{SPACER}" alt="" height="5" width="1" /><!-- END tablefoot --><!-- END catrow -->

Now add this in your CSS, change #px value to the font-size you desire:

Code:
#tp22, #tp23 {
  font-size: #px;
}

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by DeathDunk98* April 2nd 2014, 11:07 am

can you be more precise with the Minimize Option (Category Toggler) I already visited the site you gave me and created a javascript as it was in tutorial, copied the Phpbb2 Click Image code and paste it to my javascript and still dont see no minimize option ?
DeathDunk98*
DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by Pizza Boi April 2nd 2014, 11:09 am

Hi Very Happy

Did you add this in your JS (Make sure it's on! ) : Tick it in either Home Page or All Pages (Experiment as it was not stated in the tuto)

Code:
$(function(){
$('#content-container .secondarytitle').parent().append('<span class="toggles"><img src="http://2img.net/i/fa/m/tabs_less1.gif"/></span>');
var heads = $('#content-container .secondarytitle').parent();
for(var i=0;i<heads.length;i++){
 $(heads[i]).attr({
 id:'cat'+i,
 class: 'parent'
 });
}
var cookie = ReadCookie('catTog').split(',');
for(var j=0;j<cookie.length;j++){
 $(cookie[j]).nextAll('tr').css('display','none');
 $(cookie[j]).find('.toggles').children('img').attr('src','http://2img.net/i/fa/subsilver/tabs_more.gif');
}

$('.toggles').on('click',function() {
var g = $(this).closest('.parent').nextAll('tr').css('display');
cookieList = ReadCookie('catTog');
if(g == "table-row") {
var cid= $(this).closest('.parent').attr('id');
$(this).closest('.parent').nextAll('tr').hide();
 SetCookie("catTog",cookieList+",#"+cid,1000);
$(this).children('img').attr('src','http://2img.net/i/fa/subsilver/tabs_more.gif');
} else {
KillCookie("catTog");
var newCookie=[],
a= $('.parent').nextAll('tr').filter(":hidden"),
c = $.map(a,function(n,i){
return "#"+$(a).closest('.parent').attr('id');
});
newCookie= c.join(',');
    SetCookie('catTog',newCookie, 100);
$(this).children('img').attr('src','http://2img.net/i/fa/m/tabs_less1.gif').parent().parent().parent().children('tr').not(":eq(0)").show();
}
});
});

function SetCookie(cookieName,cookieValue,nDays) {
var today = new Date();
var expire = new Date();
if (nDays===null || nDays===0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
}
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName+"=");
if (ind===-1 || cookieName==="") return "";
var ind1=theCookie.indexOf(";",ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
function KillCookie(cookieName){SetCookie(cookieName,"",-1);}

And this in your CSS?

Code:
.toggles {
position: absolute;
right: 5px;
top: 5px;
}
.forumline {
position:relative;
}

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by DeathDunk98* April 2nd 2014, 11:12 am

yes Already tried that but it's not working :/
DeathDunk98*
DeathDunk98*
Forumember

Posts : 479
Reputation : 3
Language : Shqip

Back to top Go down

Minimize Option and Smaller font on category  Empty Re: Minimize Option and Smaller font on category

Post by Pizza Boi April 2nd 2014, 11:16 am

Hi Very Happy

I'm not the one who coded that so please consult the one who made it in that website.

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum