Re: Add a link to usercp.tmpl [message #40237 is a reply to message #39391] |
Sun, 27 January 2008 12:40 |
Dustin Kowalski
Messages: 62 Registered: August 2006 Location: Leicester
Karma:
|
Member |
|
|
OK, one of the members on this site PM'd me to ask whether I had understood what was written here and whether I'd successfully implemented the changes.
I'm not a computer-minded person either, and lots of the comments, suggestions, and instructions fly over my head when they come from people who are professionals in the field, so I'll write a layman's version of how I successfully make changes when I manage to.
In this case, I wanted to add two items to the user control panel (the links that scroll across the top of the page for private messaging, members, and so on).
I wanted to add something saying "Jebsite" which would link to my homepage, and another reading "Vortaroj" (Esperanto for "dictionaries") which would take me to a separate page.
Here's the finished version:
To do this you need to:
1) Visit usercp.tmpl and select usercp.
The default looks like this:
<div class="UserControlPanel">{TEMPLATE-DATA: private_msg} {IF: ($FUD_OPT_1 & 8388608 || (_uid && $FUD_OPT_1 & 4194304) || $usr->users_opt & 1048576)}{TEMPLATE: member_search}{ENDIF} ...
2) Amend this to include the name of something that you wish to add. In my case, I was going to add two things. I'm going to call them "jebsite" and "dictionaries".
The first line of usercp.tmpl now looks like this:
<div class="UserControlPanel">{TEMPLATE: jebsite} {TEMPLATE: dictionaries} {TEMPLATE-DATA: private_msg} {IF: ($FUD_OPT_1 & 8388608 || ...
3) All the forum knows so far is to display the new things; you need to tell it what "jebsite" and "dictionaries" are.
To do this, go to "file manager", head to the relevant theme folder, and download the file usercp.tmpl.
Open this with WordPad, Notepad or whatever.
You'll notice that lots of familiar things are individually referenced between [SECTION] tags, such as "login". This is where the computer visits to get the details of the shorthand {TEMPLATE-DATA: private_msg} that was displayed when you displayed usercp.tmpl.
So now follow the lead and add the details for whatever you're adding. My jebsite link looks like:
{SECTION: jebsite}<a class="UserControlPanel nw" href="http://www.jeb.org.uk/" target="_blank"><img src="{THEME_IMAGE_ROOT}/jebsiteLogo.png" alt="Jebsite" /> Jebsite</a> {SECTION: END}
4) Save this and put it back where you got it from.
5) Visit your forum to verify that it's working.
6) Repeat this for your other themes.
That's how I did it. I hope that this may be of use to someone else who, like me, is not very experienced with computers.
-
Attachment: adpanel.jpg
(Size: 64.68KB, Downloaded 1314 times)
|
|
|