Please Register and Login to this forum to stop seeing this advertsing.
Add Karma
 rated by members
Add Comment
Show Comments
![online/offline]() |
Posted: Post subject: |
|
|
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
Posted: Fri Mar 09, 2007 7:36 am Post subject: New template macros |
|
|
For logged in users, the following macros are now defined throughout:
{USER_ID}
{USERNAME}
{AVATAR}
So for example a welcome to a logged in user can be shown in overall_header.tpl. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
Posted: Fri Mar 09, 2007 10:25 am Post subject: |
|
|
A new switch:
<!-- BEGIN switch_private_message_new -->
<!-- END switch_private_message_new -->
which allows you to add stuff to a template if new private messages exist has been added. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
Posted: Fri Mar 09, 2007 12:13 pm Post subject: |
|
|
I have also added:
<!-- BEGIN switch_private_message_unread -->
<!-- END switch_private_message_unread -->
and:
{PRIVATE_MESSAGE_UNREAD_FLAG} which contains the number of unread messages. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
|
|
| Back to top |
|
 |
symon Moderator


 Virtual Cash: 34170
Joined: 04 Sep 2005 Posts: 11651
Location: Hampshire,England Add Karma
 rated by 91 members
Add Comment
Show Comments
 |
Posted: Fri Mar 09, 2007 12:50 pm Post subject: |
|
|
Have added a walkthough but for a welcome text message only
HOWTODOIT _________________

|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 12:37 pm Post subject: |
|
|
When editing templates, you can now use code like:
| Code: |
<script language="JavaScript" type="text/javascript">
if ({USER_LEVEL_FLAG} != -1)
{
document.write("<a href=\"javascript:void(0)\" onclick=\"window.open('addcomment.php?userid={postrow.POSTER_ID}&component=COMMENT', '_addcomment', 'resizable=yes,width=500,height=360')\">Add Comment</a>");
}
</script>
|
{USER_LEVEL_FLAG} has the values:
-1 - Guest
0 User
1 Admin
2 Mod
Note in the example above that hides the Add Comment line from anyone who is not logged in, you will need to "escape" the " character with \" when it is used in document.write. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
|
|
| Back to top |
|
 |
Roy Expert


 Virtual Cash: 2000
Joined: 02 Jun 2006 Posts: 1059
Location: Wolverhampton, England Add Karma
 rated by 7 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 12:45 pm Post subject: |
|
|
| Symon wrote: | Have added a walkthough but for a welcome text message only
HOWTODOIT |
Hey Symon when i moved my mouse over your banner it said click to activate your account? this was on your site above.  _________________

|
|
| Back to top |
|
 |
symon Moderator


 Virtual Cash: 34170
Joined: 04 Sep 2005 Posts: 11651
Location: Hampshire,England Add Karma
 rated by 91 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 12:49 pm Post subject: |
|
|
| Roy wrote: | | Symon wrote: | Have added a walkthough but for a welcome text message only
HOWTODOIT |
Hey Symon when i moved my mouse over your banner it said click to activate your account? this was on your site above.  |
Can you do a screen shot as i just logged out and run the mouse over the banner and see nothing. _________________

|
|
| Back to top |
|
 |
Roy Expert


 Virtual Cash: 2000
Joined: 02 Jun 2006 Posts: 1059
Location: Wolverhampton, England Add Karma
 rated by 7 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 12:51 pm Post subject: |
|
|
Yup i can but i need to know how to take the screen shot and then how to upload it on here.  _________________

|
|
| Back to top |
|
 |
Roy Expert


 Virtual Cash: 2000
Joined: 02 Jun 2006 Posts: 1059
Location: Wolverhampton, England Add Karma
 rated by 7 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 12:55 pm Post subject: |
|
|
Ok cerrection its where it has all the forum controls ie, FAQ, Search, Members list etc. If i hover the mouse over it it say's click to activate and use this control. _________________

|
|
| Back to top |
|
 |
symon Moderator


 Virtual Cash: 34170
Joined: 04 Sep 2005 Posts: 11651
Location: Hampshire,England Add Karma
 rated by 91 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 1:17 pm Post subject: |
|
|
| Roy wrote: | | Ok cerrection its where it has all the forum controls ie, FAQ, Search, Members list etc. If i hover the mouse over it it say's click to activate and use this control. |
You are using IE ???? i would think
Read here
http://www.runningrock.com/click_to_activate_and_use_this_control.html _________________

|
|
| Back to top |
|
 |
Roy Expert


 Virtual Cash: 2000
Joined: 02 Jun 2006 Posts: 1059
Location: Wolverhampton, England Add Karma
 rated by 7 members
Add Comment
Show Comments
 |
Posted: Sat Mar 24, 2007 1:23 pm Post subject: |
|
|
Yup i am and after clicking on that link i can see its normal for some people, i have now started downloading the patch.
Thanks for your help Symon.  _________________

|
|
| Back to top |
|
 |
the_punisher_kid Craftsman


Joined: 03 May 2006 Posts: 331
Location: Somewhere near the border of Canada. Add Karma
 rated by 0 members
Add Comment
Show Comments
 |
Posted: Sun Mar 25, 2007 5:10 am Post subject: Re: New template macros |
|
|
| admin (no pm's please) wrote: | For logged in users, the following macros are now defined throughout:
{USER_ID}
{USERNAME}
{AVATAR}
So for example a welcome to a logged in user can be shown in overall_header.tpl. |
Hold on, do we put those anywhere in the overall header? Or is it just a specific spot? _________________

|
|
| Back to top |
|
 |
CodyT07 Guru


 Virtual Cash: 4410
Joined: 22 Mar 2006 Posts: 3595
Location: Tennessee Add Karma
 rated by 22 members
Add Comment
Show Comments
 |
Posted: Sun Mar 25, 2007 6:25 am Post subject: |
|
|
Where you want them to appear e.g. sub portals. _________________ "Great minds talk about ideas, mediocre minds talk about current events, small minds talk about other peoples"
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin


 Virtual Cash: 24210
Joined: 22 May 2005 Posts: 25515
Add Karma
 rated by 214 members
Add Comment
Show Comments
 |
Posted: Tue Jun 26, 2007 5:10 pm Post subject: |
|
|
Some for viewforum_body.tpl
topicrow.S_TOPIC_TYPE
which can be:
SUBFORUM -1
NORMAL 0
STICKY 1
ANNOUNCE 2
GLOBAL_ANNOUNCE 3
PORTAL_FRONTPAGE 4
PORTAL_TOP 5
PORTAL_ARCHIVE 6
PORTAL_EDITORSCHOICE 7
PORTAL_OPENTICKET 8
also
S_SUBFORUMS
S_ANNOUNCEMENTS
S_STICKIES
are macros set the total of those topic types. note announcements is all announcement types.
_________________
Family Friendly Shareware | | Web Design/Services | Free Forums
|
|
| Back to top |
|
 |