PDA

View Full Version : Mini Mods - "Create & Search Group" on top of group overview


nerofix
22 Dec 2007, 20:44
Description: Very easy modification. This template modification simply add a table on the top of your groups overview under the navbar with links to create new groups and search for groups. It should be able to easily integrate into your design as well as easy to install.
I made this templatemodification because my members have to scroll down first a big list of groups before they can find the "create group" button.


Instructions/Installation: Very Easy

In the Style Manager, open the template "SOCIALGROUPS" and under $navbar add:

<!-- create & search group table -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" style="margin-bottom:20px">
<tr>
<td colspan="3" align="center" class="tfoot smallfont">
<if condition="$show['creategroup']">
<strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[create_a_new_group]</a></strong> &nbsp;
</if>
&nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[search_groups]</a></strong>
</td>
</tr>
</table>
<!-- / create & search group table -->


Thats all :)

If you like this modification please click install .

Live demo: http://www.nerofix.com/group.php? ("create group" link is not shown for guests there)

Screenshot see attachement!

nerofix
22 Dec 2007, 20:46
*Reserved*

whitetigergrowl
22 Dec 2007, 23:18
Odd. Doesn't work for me.

nerofix
22 Dec 2007, 23:25
Odd. Doesn't work for me.

Can you give me your SOCIALGROUPS template code? Then I can have a look to fix it for you.

whitetigergrowl
23 Dec 2007, 00:02
I have not edited it. This is from the latest beta release (3):

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $custompagetitle</title>
</head>
<body>
$header
$navbar

<if condition="$mygroup_bits">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" style="margin-bottom:20px">
<tr>
<td class="tcat" colspan="3">$vbphrase[you_are_a_member_of_the_following_groups]</td>
</tr>
<tr>
<td class="thead" width="100%">$vbphrase[group_name]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[joined_group]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[group_options]</td>
</tr>
$mygroup_bits
</table>
</if>

<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="$stylevar[left]">
<td class="tcat">
$vbphrase[errors_occured_with_search]
</td>
</tr>
<tr>
<td class="alt1">
<ol>$errorlist</ol>
</td>
</tr>
</table>

<br />
</if>

<form action="group.php?$session[sessionurl]do=grouplist" method="post">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" width="100%" colspan="3">
<div style="float:$stylevar[right]" class="normal">$vbphrase[search_groups] <input type="text" class="bginput" name="filtertext" value="$filters[text]" style="font-size: 11px;" />&nbsp;<input type="submit" class="button" value="$vbphrase[go]" /></div>
$grouplisttitle
</td>
</tr>
<if condition="$grouplist">
<tr>
<td class="thead" width="100%">
<a href="$sorturl&amp;order=asc&amp;sort=name">$vbphrase[group_name]</a> $sortarrow[name]
</td>
<td class="thead" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=desc&amp;sort=members">$vbphrase[group_members]</a> $sortarrow[members]
</td>
<td class="thead" width="150" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=desc&amp;sort=created">$vbphrase[group_created]</a> $sortarrow[created]
</td>
</tr>
$grouplist
<else />
<tr>
<td class="alt1" align="center" colspan="3">$vbphrase[no_groups_to_display]</td>
</tr>
</if>

<tr>
<td colspan="3" align="center" class="tfoot smallfont">
<if condition="$show['creategroup']">
<strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[create_a_new_group]</a></strong> &nbsp;
</if>
&nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[search_groups]</a></strong>
</td>
</tr>
</table>
<if condition="$pagenav">
<div style="margin-top: $stylevar[cellpadding]px">$pagenav</div>
</if>

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="dofilter" value="1" />
</form>


$footer
</body>
</html>

nerofix
23 Dec 2007, 00:27
Okay, replace everything in your SOCIALGROUPS template with this code:

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $custompagetitle</title>
</head>
<body>
$header
$navbar

<!-- create & search group table -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" style="margin-bottom:20px">
<tr>
<td colspan="3" align="center" class="tfoot smallfont">
<if condition="$show['creategroup']">
<strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[create_a_new_group]</a></strong> &nbsp;
</if>
&nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[search_groups]</a></strong>
</td>
</tr>
</table>
<!-- / create & search group table -->

<if condition="$mygroup_bits">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" style="margin-bottom:20px">
<tr>
<td class="tcat" colspan="3">$vbphrase[you_are_a_member_of_the_following_groups]</td>
</tr>
<tr>
<td class="thead" width="100%">$vbphrase[group_name]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[joined_group]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[group_options]</td>
</tr>
$mygroup_bits
</table>
</if>

<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="$stylevar[left]">
<td class="tcat">
$vbphrase[errors_occured_with_search]
</td>
</tr>
<tr>
<td class="alt1">
<ol>$errorlist</ol>
</td>
</tr>
</table>

<br />
</if>

<form action="group.php?$session[sessionurl]do=grouplist" method="post">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" width="100%" colspan="3">
<div style="float:$stylevar[right]" class="normal">$vbphrase[search_groups] <input type="text" class="bginput" name="filtertext" value="$filters[text]" style="font-size: 11px;" />&nbsp;<input type="submit" class="button" value="$vbphrase[go]" /></div>
$grouplisttitle
</td>
</tr>
<if condition="$grouplist">
<tr>
<td class="thead" width="100%">
<a href="$sorturl&amp;order=asc&amp;sort=name">$vbphrase[group_name]</a> $sortarrow[name]
</td>
<td class="thead" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=desc&amp;sort=members">$vbphrase[group_members]</a> $sortarrow[members]
</td>
<td class="thead" width="150" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=desc&amp;sort=created">$vbphrase[group_created]</a> $sortarrow[created]
</td>
</tr>
$grouplist
<else />
<tr>
<td class="alt1" align="center" colspan="3">$vbphrase[no_groups_to_display]</td>
</tr>
</if>

<tr>
<td colspan="3" align="center" class="tfoot smallfont">
<if condition="$show['creategroup']">
<strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[create_a_new_group]</a></strong> &nbsp;
</if>
&nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[search_groups]</a></strong>
</td>
</tr>
</table>
<if condition="$pagenav">
<div style="margin-top: $stylevar[cellpadding]px">$pagenav</div>
</if>

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="dofilter" value="1" />
</form>


$footer
</body>
</html>

If this doesnt work, then please give me the link to your forum, then I can have a deeper look.

whitetigergrowl
23 Dec 2007, 00:32
Got it to work. Thanks!

nerofix
23 Dec 2007, 00:56
Your welcome :)

Don't forget to click on install to recieve update info ;)

mesdar
12 Dec 2008, 08:37
Thanks

Installed