PDA

View Full Version : How can I do these modifications to GARS


QtrCafe
06-30-2009, 04:28 PM
Hello,

Ok I don't know how is this going to sound but here is what I want to do :)

1. I want to use GARS as my home page however it would not apply the template changes in to the index page of the forum. Is there a way to get around this?

2. I want to change the forumdisplay to look a bit different. In the meantime the page shows the subforums in the middle and below it comes the articles.

What I want it to do is erase the subforums completely and add a list to the left or right of the articles right away which would show the forums within it.

for example
if this is how you have structured your articles forum

- Articles forum
- - Computers
- - Internet
- - Cellphones
- - - Nokia
- - - Samsung
- - - iPhones

When you are in the "Articles Forum" you can only see

- - Computers
- - Internet
- - Cellphones

Then you click on "Cellphones" you would only see

- - - Nokia
- - - Samsung
- - - iPhones

so what I want is to apply the depth option which is in the admin CP to this list.

I am not sure if it is clear or not please let me know. :confused:

I hope this is easy to do. :eek:

Morgan
06-30-2009, 06:28 PM
1: http://www.thevbgeek.com/showthread.php?t=5196

2: You'd need to edit the GARS_forumdisplay template or make a new template for the forum display page. Look in the GARS_forumdisplay template, as there you will find HTML comments that indicate the sub-forum list, the HTML for which you could edit and move to a sidebar/column if you want.

QtrCafe
07-01-2009, 06:04 PM
Hey Morgan,

Thanks for your help ...

1. I will take care of it and use redirects.

2. I have missed the categories.php which is a module included with the GARS However it shows all forums and subforums. I would like to make a little change to it which will only show the subforums which are under the forum I am browsing.

I have managed to add the code below to the forum display which does exactly what I want however I am not able to get it positioned in the right place which is at the top-left. Is there a way to use this code in the categories.php module?


<!-- Navigation -->
<tr>
<td>
<if condition="$show['forumslist'] && !$show['nosubs']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<thead>
<tr>
<td class="tcat" style="white-space:nowrap;"><div><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('gar_$itemid')"><img id="collapseimg_gar_$itemid" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_gar].gif" alt="" border="0" /></a>$foruminfo[title]</div></td>
</tr>
</thead>
<tbody style="$vbcollapse[collapseobj_gar]" id="collapseobj_gar_$itemid">
<tr>
<td class="panelsurround">
<div class="panel" align="$stylevar[left]">
<div class="fieldset">
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="$stylevar[gars_mod_width]" id="gars_container_$itemid">
$forumbits
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</if>
</td>
</tr>

Morgan
07-02-2009, 02:58 PM
You could edit the GARS_forumdisplay template, assuming that is the template you are using for the forumdisplay page.

In the GARS_forumdisplay template are variables like the following, where X is 1, 2, 3, or 4:

$show[GARS_modpositionX]


1: Above threads
2: Left of threads
3: Right of threads
4: Below threads

Look for those variables in the template and add your ad code where you want it to appear.

Similarly, in the GARS_pb template are variables like the following, where X is 1, 2, 3, 4, 5, or 6:

$post[GARS_modpositionX]


1: Above Header
2: Inside Header
3: Below Header
4: Left of content
5: Right of content
6: Below content

QtrCafe
07-02-2009, 06:13 PM
Hey Morgan,

Thanks for that ... its really helpful

however I have found this MOD (http://www.thevbgeek.com/showthread.php?filter[20]=GARS&t=2055)which would save me the hassle of playing around with the original templates. However I am not able to get it to output what is in the template

I have followed all the steps and got it working. The only issue I am facing is when I add the following template it does not output nothing.

however if I input the following, it works just fine

<a href="http://www.google.com">This is a test</a>

is there a way to get it to take the following code and output the result of it

<!-- Navigation -->
<tr>
<td>
<if condition="$show['forumslist'] && !$show['nosubs']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<thead>
<tr>
<td class="tcat" style="white-space:nowrap;"><div><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('gar_$itemid')"><img id="collapseimg_gar_$itemid" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_gar].gif" alt="" border="0" /></a>$foruminfo[title]</div></td>
</tr>
</thead>
<tbody style="$vbcollapse[collapseobj_gar]" id="collapseobj_gar_$itemid">
<tr>
<td class="panelsurround">
<div class="panel" align="$stylevar[left]">
<div class="fieldset">
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="$stylevar[gars_mod_width]" id="gars_container_$itemid">
$forumbits
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</if>
</td>
</tr>

QtrCafe
07-02-2009, 08:43 PM
I'm going nuts trying to modify those codes

is there something that I can delete from the "categories.php" mod in order for it to only show depth of "1" and not all categories?

QtrCafe
07-03-2009, 12:39 PM
I have noticed one thing ...

Whenever I used a code like this

<if condition="$forumid==1">

Code here...

</if>

It will never work just as the template is empty

basically if I try to add a variable within this template it would never work meaning

if I add this within the template

$forumhome_forumbit_level1_post

it would not work

however if i use html code it works fine ..

is there something that i am missing?

QtrCafe
07-09-2009, 03:17 AM
Oh yeah :D

I finally found a way to do this :D

Here are the steps just in case someone would like to refer to it or for future reference for myself

1. ACP >> GARS >> TYPES

How many columns for subforums?

change the value of it to 1


2. ACP >> Style & Templates >> Style Manager >> GARS_forumdisplay

FIND & DELELTE:
<if condition="$show['forumslist'] && !$show['nosubs']">
<!-- sub-forum list -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal"> : $foruminfo[title]</span></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
</if>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<if condition="!$show['gars_fd_list']"><thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead></if>
$forumbits
</table>
<br />
<!-- / sub-forum list -->
</if>


FIND:
<!-- LEFT COLUMN -->
<if condition="$show[GARS_columns]">
<tr valign="top">
<if condition="$show[GARS_modposition2]">
<td valign="top" width="$stylevar[gars_mod_width]" style="padding-top:10px; padding-$stylevar[right]:10px">
$show[GARS_modposition2]
<br />
<img src="clear.gif" width="$stylevar[gars_mod_width]" alt="" height="1px" border="0" />
</td>
</if>
<td style="padding-top:10px;">
</if>
<!--LEFT COLUMN -->


REPLACE WITH:
<!-- LEFT COLUMN -->
<if condition="$show[GARS_columns]">
<tr valign="top">
<td valign="top" width="$stylevar[gars_mod_width]" style="padding-top:10px; padding-$stylevar[right]:10px">
<!-- sub-forum list -->
<if condition="$show['forumslist'] && !$show['nosubs']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$foruminfo[title]</span></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></if></td>
</if>
</tr>
</table>


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<if condition="!$show['gars_fd_list']"><thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead></if>
$forumbits
</table>
<br />
</if>

<!-- / sub-forum list -->

<if condition="$show[GARS_modposition2]">

$show[GARS_modposition2]
<br />
<img src="clear.gif" width="$stylevar[gars_mod_width]" alt="" height="1px" border="0" />
</td>
</if>
<td style="padding-top:10px;">
</if>
<!--LEFT COLUMN -->

SAVE THE TEMPLATE

3. ACP >> Style & Templates >> Style Manager >> GARS_forumbit_level1_post

DELETE ALL ITS CONTENT AND REPLACE WITH:
<td class="alt1" valign="top" align="$stylevar[left]" id="f$forum[forumid]">
<div class="panel" align="$stylevar[left]">
<div class="fieldset">


<div>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a> ($forum[threadcount])
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
$childforumbits

</div>
</div>
</td>

PEACE

ENJOY:D

SteveRobWhatever
01-13-2011, 06:23 AM
Very cool, thank you for this. Now is there any way to have the sub-forums display in order by newest thread start date? Also, how do I get the sub-forums to appear in the sub-forums themselves? Example:

This is our main GARS page:
http://gridironfans.com/forums/nfl-uncensored/

And this is inside a sub-forum:

http://gridironfans.com/forums/captain-nfl/

See? No sub-forum listing. Can that be enabled? Also, in the new listing for the sub-forums, can a forum icon be displayed? If so, how?