myfreeforum.org Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Who is OnlineWho is Online   Join! (free) Join! (free)  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
For an excellent guide to using your myfreeforum forum, you can visit
howtodoit
The howtodoit "readonly" forum provides answers and walkthroughs for all common questions.
  • Welcome
  • Country: US
    US
    Address: 38.107.191.106
  • Server Appeal

New template macros
Page 1, 2  Next
 
Post new topic   Reply to topic    myfreeforum.org Forum Index -> What's new? Announcements!
View previous topic :: View next topic  
Author Message
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
Private message
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Fri Mar 09, 2007 7:36 am    Post subject: New template macros Reply with quote

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
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Fri Mar 09, 2007 10:25 am    Post subject: Reply with quote

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
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Fri Mar 09, 2007 12:13 pm    Post subject: Reply with quote

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
View user's profile Private message Visit poster's website
symon
Moderator
Moderator


Virtual Cash: 34170

Joined: 04 Sep 2005
Posts: 11651


Location: Hampshire,England
Add Karma

rated by 91 members
Add Comment
Show Comments

online/offline
PostPosted: Fri Mar 09, 2007 12:50 pm    Post subject: Reply with quote

Have added a walkthough but for a welcome text message only

HOWTODOIT
_________________




Back to top
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 12:37 pm    Post subject: Reply with quote

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}&amp;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
View user's profile Private message Visit poster's website
Roy
Expert
Expert


Virtual Cash: 2000

Joined: 02 Jun 2006
Posts: 1059


Location: Wolverhampton, England
Add Karma

rated by 7 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 12:45 pm    Post subject: Reply with quote

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
View user's profile Private message
symon
Moderator
Moderator


Virtual Cash: 34170

Joined: 04 Sep 2005
Posts: 11651


Location: Hampshire,England
Add Karma

rated by 91 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 12:49 pm    Post subject: Reply with quote

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
View user's profile Private message
Roy
Expert
Expert


Virtual Cash: 2000

Joined: 02 Jun 2006
Posts: 1059


Location: Wolverhampton, England
Add Karma

rated by 7 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 12:51 pm    Post subject: Reply with quote

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
View user's profile Private message
Roy
Expert
Expert


Virtual Cash: 2000

Joined: 02 Jun 2006
Posts: 1059


Location: Wolverhampton, England
Add Karma

rated by 7 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 12:55 pm    Post subject: Reply with quote

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
View user's profile Private message
symon
Moderator
Moderator


Virtual Cash: 34170

Joined: 04 Sep 2005
Posts: 11651


Location: Hampshire,England
Add Karma

rated by 91 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 1:17 pm    Post subject: Reply with quote

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
View user's profile Private message
Roy
Expert
Expert


Virtual Cash: 2000

Joined: 02 Jun 2006
Posts: 1059


Location: Wolverhampton, England
Add Karma

rated by 7 members
Add Comment
Show Comments

online/offline
PostPosted: Sat Mar 24, 2007 1:23 pm    Post subject: Reply with quote

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
View user's profile Private message
the_punisher_kid
Craftsman
Craftsman


Joined: 03 May 2006
Posts: 331


Location: Somewhere near the border of Canada.
Add Karma

rated by 0 members
Add Comment
Show Comments

online/offline
PostPosted: Sun Mar 25, 2007 5:10 am    Post subject: Re: New template macros Reply with quote

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
View user's profile Private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CodyT07
Guru
Guru


Virtual Cash: 4410

Joined: 22 Mar 2006
Posts: 3595


Location: Tennessee
Add Karma

rated by 22 members
Add Comment
Show Comments

online/offline
PostPosted: Sun Mar 25, 2007 6:25 am    Post subject: Reply with quote

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
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Mon Jun 25, 2007 11:51 am    Post subject: Reply with quote

New one for memberlist.php

{memberrow.WWW_URL}

example use:

<!-- IF memberrow.WWW_URL != "" -->
{memberrow.WWW_URL}
<!-- ENDIF -->
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 24210

Joined: 22 May 2005
Posts: 25515



Add Karma

rated by 214 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 26, 2007 5:10 pm    Post subject: Reply with quote

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
View user's profile Private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    myfreeforum.org Forum Index -> What's new? Announcements! All times are GMT
Page 1, 2  Next
Page 1 of 2
 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group