PDA

View Full Version : make usercp nav a module?


robert_2004
10-08-2004, 02:50 AM
How would i make the usercp nav a module, so it would be on the left column (i'm intergrating the CMPS around the whole site.) and right now i have two columns, (the cmps doesn't show the usercp nav [i tried already, but i can't get it to work].

do i need to include a file, or change directories on the page so it thinks it is in 'forum/' ??

this is what i've putting into a module (just ripped it from the usercp_shell)



<!-- usercp nav -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
<tr>
<td class="tcat"><a href="usercp.php?$session[sessionurl]">$vbphrase[control_panel]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[settings_and_options]</td>
</tr>
<if condition="$show['siglink']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td>
</tr>
<tr>
<td class="$navclass[profile]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td>
</tr>
<tr>
<td class="$navclass[options]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td>
</tr>

<!-- / add arcade settting to user_cp START -->

<tr>
<td class="$navclass[arcade]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editarcade">$vbphrase[edit_arcade]</a></td>
</tr>

<!-- / add arcade settting to user_cp END -->


<if condition="$show['avatarlink']">
<tr>
<td class="$navclass[avatar]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td>
</tr>
</if>
<if condition="$show['profilepiclink']">
<tr>
<td class="$navclass[profilepic]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofilepic">$vbphrase[edit_profile_picture]</a></td>
</tr>
</if>
<if condition="$show['pmstats']">
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_pmfolders">$vbphrase[private_messages] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_pmfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_pmfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[pmfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[pm_messagelist]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]">$vbphrase[list_messages]</a></td>
</tr>
<tr>
<td class="$navclass[pm_newpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=newpm">$vbphrase[send_new_message]</a></td>
</tr>
<if condition="$show['pmtracklink']">
<tr>
<td class="$navclass[pm_trackpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=trackpm">$vbphrase[track_messages]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[pm_editfolders]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
</if>
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_subsfolders">$vbphrase[subscribed_threads] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_subsfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_subsfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[subsfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[substhreads_listthreads]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[list_subscriptions]</a></td>
</tr>
<tr>
<td class="$navclass[substhreads_editfolders]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[miscellaneous]</td>
</tr>
<tr>
<td class="$navclass[event_reminders]" nowrap="nowrap"><a class="smallfont" href="calendar.php?$session[sessionurl]do=viewreminder">$vbphrase[event_reminders]</a></td>
</tr>
<if condition="$show['paidsubscriptions']">
<tr>
<td class="$navclass[paid_subscriptions]" nowrap="nowrap"><a class="smallfont" href="subscriptions.php?$session[sessionurl]">$vbphrase[paid_subscriptions]</a></td>
</tr>
</if>
<if condition="$show['publicgroups']">
<tr>
<td class="$navclass[usergroups]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editusergroups">$vbphrase[group_memberships]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[buddylist]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editlist">$vbphrase[buddy_ignore_lists]</a></td>
</tr>
<tr>
<td class="$navclass[attachments]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editattachments">$vbphrase[attachments]</a></td>
</tr>

<!-- / who quoted me - by robert - 30th september START -->
<tr>
<td class="alt2" nowrap="nowrap"><a class="smallfont" href="whoquotedme.php?$session[sessionurl]">Who Quoted Me?</a></td>
</tr>
<!-- / who quoted me - by robert - 30th september END -->

</table>
<!-- / usercp nav -->

Brian
10-08-2004, 10:07 AM
How exactly is it not working? If it's just not showing some of the links that's because of the <if> conditions in the template. You would need to search in your usercp.php file and copy some of the code for those conditions.

Our Sponsors
 

robert_2004
10-08-2004, 12:23 PM
it's not showing any of the module - not even the table/box.

Brian
10-08-2004, 02:23 PM
How did you set the options when adding the module?

Our Sponsors
 

robert_2004
10-09-2004, 05:11 AM
Module Title: User CP navigation
Module Identifier: (none)
File to Include: (none)
OR Template to Include: adv_portal_usercp_nav
Active: yes
Column: left
Display Order: 2
Templates Used: USERCP_SHELL (even though not using file, i thought i'd add this to try it)

i said i put the first post's code into a module, but i actually mean template.

robert_2004
10-09-2004, 10:53 AM
what have i done wrong?

Brian
10-09-2004, 05:06 PM
OR Template to Include: adv_portal_usercp_nav
Should be 'usercp_nav'

robert_2004
10-10-2004, 09:21 AM
alright - that fixed it :o
thanks for that!