Adding online/offline message in signature

How-to's, little tricks, tutorials, code examples (snippets) and read-me's.

Adding online/offline message in signature

Postby stitch626 » 16 Mar 2008, 11:53

At first I was going to attempt to write a big mod for this but after I thought about it a bit this wouldn't take that much work.

Now many of you who have used phpbb2 may know of a mod where you allow you place a bbcode in your sig and it would display your online/offline status. This mod required a very extensive amount of editing the core code.

Now thanks to the custom profile fields and Sniper_E's tutorial on utilizing custom profile fields, this task is very easy to accomplish with editing only two template files file.
We will display the online text in bright green and the offline status in red.

First we will need to create two custom profile fields.

Let's call the first one "online_status" and let's make it a "Single text field"
Name your "Field name/title presented to the user:" to "online status"
Give short description (See screen shot)


Now let's create the 2nd profile field and let's call it "offline_status" and let's make it a "Single text field" also.
Name your "Field name/title presented to the user:" to "offline status"
Give short description (See screen shot)

Now for the fun part.

SUBSILVER2
Open up Viewtopic_body.html and find this code:
Code: Select all
<!-- IF postrow.SIGNATURE -->
                  <span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
               <!-- ENDIF -->

After add:
Code: Select all
<br />
<!-- BEGIN custom_fields -->
            <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "online status" and postrow.S_ONLINE -->
         <table width="100%" cellspacing="1">
         <td align="center">
         <span style="color: #00FF00;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
         </td>
         </tr>
         </table>
         <!-- END custom_fields -->
            <!-- ENDIF -->
         
         <!-- BEGIN custom_fields -->         
            <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "offline status" and not postrow.S_ONLINE -->
         <table width="100%" cellspacing="1">
         <td align="center">
         <span style="color:red;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
         </td>
         </tr>
         </table>
            <!-- ENDIF -->
            <!-- END custom_fields -->

FIND:
Code: Select all
<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}


BEFORE_ADD
Code: Select all
<!-- IF not ( custom_fields.PROFILE_FIELD_NAME  eq "online status" or custom_fields.PROFILE_FIELD_NAME  eq "offline status"  )  -->

ONCE AGAIN FIND:
Code: Select all
<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}

AFTER_ADD:
Code: Select all
<!-- ENDIF -->

Be sure to purge your templates cache

PROSILVER
OPEN VIEWTOPIC_BODY.HTML
FIND:
Code: Select all
<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->


After add:
Code: Select all
<br />
<!-- BEGIN custom_fields -->
            <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "online status" and postrow.S_ONLINE -->
         <table width="100%" cellspacing="1">
         <td align="center">
         <span style="color: #00FF00;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
         </td>
         </tr>
         </table>
         <!-- END custom_fields -->
            <!-- ENDIF -->
         
         <!-- BEGIN custom_fields -->         
            <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "offline status" and not postrow.S_ONLINE -->
         <table width="100%" cellspacing="1">
         <td align="center">
         <span style="color:red;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
         </td>
         </tr>
         </table>
            <!-- ENDIF -->
            <!-- END custom_fields -->

FIND:
Code: Select all
<dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>

BEFORE-ADD
Code: Select all
<!-- IF not ( custom_fields.PROFILE_FIELD_NAME  eq "online status" or custom_fields.PROFILE_FIELD_NAME  eq "offline status"  )  -->

ONCE AGAIN FIND:
Code: Select all
<dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>

AFTER-ADD:
Code: Select all
<!-- ENDIF -->


Be sure to purge your templates cache


Now I just need to work on this for the private messages...Stay tuned

The idea behind this mod is to give the user total customization of an online/offline message.
Basically just a novelty but I have found that my members have a ball with it.
Now I just need to work on this for the private messages...Stay tuned

The idea behind this mod is to give the user total customization of an online/offline message.
Basically just a novelty.
Attachments
profile fileds.JPG
(14.27 KiB) Downloaded 344 times
Last edited by stitch626 on 04 Aug 2008, 14:21, edited 2 times in total.
Reason: Added instructions for prosilver and instructions to hide the custom profiles in users profile.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Adding online/offline status in signature

Postby Semi_Deus » 16 Mar 2008, 13:25

Hi Mike,

Looks like a great add-on!!
I only got a small tip, people usually follow instructions very close.
In your message you said we have to create a custom profile field, which we call: online_status (offline_status)
But in the Code you refer to: online status (offline status)
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "online status" and postrow.S_ONLINE -->
This might give problems with the _ , because if people have actually named it: online_status, the online status (without _)
does not exist. Just a small detail, but the rest seems perfect :D
Former Moderator & Styles team member
Image
User avatar
Semi_Deus
Admiral
Admiral
 
Posts: 2479
Joined: 13 Feb 2007, 13:53
Location: Netherlands
Favorite Team: Ajax
Gender: Male
phpBB Knowledge: 8

Re: Adding online/offline status in signature

Postby stitch626 » 16 Mar 2008, 13:34

Good point Semi. :good:
The "offline status" and "online status" is the PROFILE_FIELD_NAME
Custom profile fields don't let you have any spaces in the Field Identification.
Partially why I posted a link to Sniper's Tutorial. It is all explained there but I will revise the tutorial.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Adding online/offline message in signature

Postby Sniper_E » 16 Mar 2008, 16:29

The postrow.custom_fields.PROFILE_FIELD_NAME is NOT the name you start the CPF with.
This name is stated inside the settings of the CPF and it CAN have a space in it. (eg. Real Name)

Nice Online/Offline custom message idea!
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6984
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Adding online/offline message in signature

Postby stitch626 » 16 Mar 2008, 16:34

Sniper_E wrote:The postrow.custom_fields.PROFILE_FIELD_NAME is NOT the name you start the CPF with.
This name is stated inside the settings of the CPF and it CAN have a space in it. (eg. Real Name)

Nice Online/Offline custom message idea!

Yea, that's what I meant. Just came out all wrong. ;)
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Adding online/offline message in signature

Postby beggers » 17 Mar 2008, 11:26

Nice work, I'll have try this. I had the custom online-offline code in my phpBB2 and it was a popular mod.
User avatar
beggers    
Supporter
Supporter
 
Posts: 166
Joined: 25 Jan 2008, 23:46
Favorite Team: Oakland Raiders
Gender: Male
phpBB Knowledge: 4

Re: Adding online/offline message in signature

Postby anne » 21 Mar 2008, 09:01

I'm sorry, I don't know what's going on but it doesn't seem like the custom profile that I have defined as mentioned above is not showing in the signature section. It does show onto the User Profile though.

Here is my viewtopic_body.html @signature part:

Spoiler:
Code: Select all
<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div>
<br />
<!-- BEGIN custom_fields -->
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "online status" and postrow.S_ONLINE -->
<table width="100%" cellspacing="1">
<td align="center">
<span style="color: #00FF00;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
</td>
</tr>
</table>
<!-- END custom_fields -->
<!-- ENDIF -->

<!-- BEGIN custom_fields -->
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "offline status" and not postrow.S_ONLINE -->
<table width="100%" cellspacing="1">
<td align="center">
<span style="color:red;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
</td>
</tr>
</table>
<!-- ENDIF -->
<!-- END custom_fields --><!-- ENDIF -->
<!-- ENDIF -->


Have I missed any edits? Thanks!
User avatar
anne
Supporter
Supporter
 
Posts: 84
Joined: 07 Nov 2007, 20:41
Gender: Female

Re: Adding online/offline message in signature

Postby stitch626 » 21 Mar 2008, 09:53

Hi Anne,

let's see if we can get you sorted out here.
First I am confused at your code. Are you using a different style other than subsilver or prosilver?
The reason I ask is because your signature code does not look like subsilver or prosilver.
Aslo the last bit of code you have:
Code: Select all
<!-- ENDIF -->
<!-- END custom_fields --><!-- ENDIF -->
<!-- ENDIF -->

Should be:
Code: Select all
<!-- ENDIF -->
            <!-- END custom_fields -->

Not sure where all those extra <!-- ENDIF --> statements came from :scratch:
Aside from that, I think your main problem is this:
There is a block of code that should be removed near the middle of the file. It comes right before the signature code:
FIND:
Code: Select all
<!-- BEGIN custom_fields -->
                  <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
               <!-- END custom_fields -->

And remove it:

I guess I should have included this part in the tutorial.

Let me know if that works.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Adding online/offline message in signature

Postby anne » 24 Mar 2008, 01:24

*sighs* I honestly don't know what I'm doing wrong. It still doesn't work. If I remove
Code: Select all
    <!-- ENDIF -->
                <!-- END custom_fields -->
.. I receive a Parse error: syntax error, unexpected $end in /home/.thurber/ncis_admin/ncismanga.net/cache/tpl_prosilver_viewtopic_body.html.php on line 282 error. :bye:

Here is my viewtopic_body.html.. I'm sorry, please guide me once again.

Spoiler:
Code: Select all
<!-- INCLUDE overall_header.html -->
<div align="center">{AD_CODE3}</div>
<!-- INCLUDE quickedit.html -->
<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
<!-- IF FORUM_DESC --><span style="display: none">{FORUM_DESC}<br /></span><!-- ENDIF -->

<!-- IF MODERATORS or U_MCP -->
   <p>
      <!-- IF MODERATORS -->
         <strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}
      <!-- ENDIF -->

   </p>
<!-- ENDIF -->

<!-- IF S_FORUM_RULES -->
   <div class="rules">
      <div class="inner"><span class="corners-top"><span></span></span>

      <!-- IF U_FORUM_RULES -->
         <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
      <!-- ELSE -->
         <strong>{L_FORUM_RULES}</strong><br />
         {FORUM_RULES}
      <!-- ENDIF -->

      <span class="corners-bottom"><span></span></span></div>
   </div>
<!-- ENDIF -->
<!-- IF S_FTRT -->
<div class="navbar">
   <div class="inner"><span class="corners-top"><span></span></span>
      <div style="text-align:center"><strong>{L_FTRT_VIEWTOPIC_PROMPT}</strong></div>
   <span class="corners-bottom"><span></span></span></div>
</div><br />
<!-- ENDIF -->
<div class="topic-actions">

   <div class="buttons">
   <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
      <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
   <!-- ENDIF -->
   </div>

   <!-- IF S_DISPLAY_SEARCHBOX -->
      <div class="search-box">
         <form method="post" id="topic-search" action="{S_SEARCHBOX_ACTION}">
         <fieldset>
            <input class="inputbox search tiny"  type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_TOPIC}" onclick="if(this.value=='{LA_SEARCH_TOPIC}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_TOPIC}';" />
            <input class="button2" type="submit" value="{L_SEARCH}" />
            <input type="hidden" value="{TOPIC_ID}" name="t" />
            <input type="hidden" value="msgonly" name="sf" />
         </fieldset>
         </form>
      </div>
   <!-- ENDIF -->

   <!-- IF PAGINATION or TOTAL_POSTS -->
      <div class="pagination">
         <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
         <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
      </div>
   <!-- ENDIF -->

</div>
<div class="clear"></div>

<!-- IF S_HAS_POLL -->
   <form method="post" action="{S_POLL_ACTION}">

   <div class="panel">
      <div class="inner"><span class="corners-top"><span></span></span>

      <div class="content">
         <h2>{POLL_QUESTION}</h2>
         <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></p>

         <fieldset class="polls">
         <!-- BEGIN poll_option -->
            <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
               <dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
               <!-- IF S_CAN_VOTE --><dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
               <!-- IF S_DISPLAY_RESULTS --><dd class="resultbar"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
               <dd><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
            </dl>
         <!-- END poll_option -->

         <!-- IF S_DISPLAY_RESULTS -->
            <dl>
               <dt>&nbsp;</dt>
               <dd class="resultbar">{L_TOTAL_VOTES} : {TOTAL_VOTES}</dd>
            </dl>
         <!-- ENDIF -->

         <!-- IF S_CAN_VOTE -->
            <dl style="border-top: none;">
               <dt>&nbsp;</dt>
               <dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
            </dl>
         <!-- ENDIF -->

         <!-- IF not S_DISPLAY_RESULTS -->
            <dl style="border-top: none;">
               <dt>&nbsp;</dt>
               <dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
            </dl>
         <!-- ENDIF -->
         </fieldset>
      </div>

      <span class="corners-bottom"><span></span></span></div>
      {S_FORM_TOKEN}
      {S_HIDDEN_FIELDS}
   </div>


   </form>
   <hr />
<!-- ENDIF -->

<!-- BEGIN postrow -->
   <!-- IF postrow.S_FIRST_UNREAD --><a id="unread"></a><!-- ENDIF -->
   <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE --> online<!-- ENDIF -->">
      <div class="inner"><span class="corners-top"><span></span></span>

      <div class="postbody">
         <!-- IF postrow.S_IGNORE_POST -->
            <div class="ignore">{postrow.L_IGNORE_POST}</div>
         <!-- ELSE -->

      <!-- IF not S_IS_BOT -->
         <!-- IF postrow.U_QUOTE or postrow.U_INFO or postrow.U_DELETE or postrow.U_EDIT -->
            <ul class="profile-icons">               <!-- IF postrow.U_EDIT --><li class="quick-edit-icon"><a href="#" id="quick_edit{postrow.POST_ID}" onclick="quick_edit({postrow.POST_ID}); return false;" title="{L_QUICKEDIT_POST}"><span>{L_QUICKEDIT_POST}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
                <!-- IF U_MCP and postrow.POSTER_WARNINGS neq 0 --><li class="warn-icon"><a class="warnings" href="{postrow.U_WARNINGS}" title="{L_WARNINGS} {postrow.POSTER_WARNINGS}"><span>{L_WARNINGS} {postrow.POSTER_WARNINGS}</span></a></li><!-- ENDIF -->


               <!-- IF postrow.U_DELETE --><li class="delete-icon"><a href="{postrow.U_DELETE}" title="{L_DELETE_POST}"><span>{L_DELETE_POST}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_REPORT --><li class="report-icon"><a href="{postrow.U_REPORT}" title="{L_REPORT_POST}"><span>{L_REPORT_POST}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_WARN --><li class="warn-icon"><a href="{postrow.U_WARN}" title="{L_WARN_USER}"><span>{L_WARN_USER}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_INFO --><li class="info-icon"><a href="{postrow.U_INFO}" title="{L_INFORMATION}"><span>{L_INFORMATION}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_QUOTE --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
            </ul>
         <!-- ENDIF -->
      <!-- ENDIF -->

         <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="{U_VIEW_TOPIC}#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
         <p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> {L_POSTED_ON_DATE} {postrow.POST_DATE} </p>

         <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
            <p class="rules">
               <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><!-- ENDIF -->
               <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
            </p>
         <!-- ENDIF -->

         <div class="content" id="postdiv{postrow.POST_ID}">{postrow.MESSAGE}</div>

         <!-- IF postrow.S_HAS_ATTACHMENTS -->
            <dl class="attachbox">
               <dt>{L_ATTACHMENTS}</dt>
               <!-- BEGIN attachment -->
                  <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
               <!-- END attachment -->
            </dl>
         <!-- ENDIF -->

         <!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">{L_DOWNLOAD_NOTICE}</div><!-- ENDIF -->
         <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
            <div class="notice">{postrow.EDITED_MESSAGE}
               <!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
            </div>
         <!-- ENDIF -->

         <!-- IF postrow.BUMPED_MESSAGE --><div class="notice">{postrow.BUMPED_MESSAGE}</div><!-- ENDIF -->
             <!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div>
    <br />
    <!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "online status" and postrow.S_ONLINE -->
    <table width="100%" cellspacing="1">
    <td align="center">
    <span style="color: #00FF00;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
    </td>
    </tr>
    </table>
    <!-- END custom_fields -->
    <!-- ENDIF -->

    <!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "offline status" and not postrow.S_ONLINE -->
    <table width="100%" cellspacing="1">
    <td align="center">
    <span style="color:red;"><i><strong>{postrow.custom_fields.PROFILE_FIELD_VALUE}</i></span></strong>
    </td>
    </tr>
    </table>
    <!-- ENDIF -->
    <!-- END custom_fields -->
      
        <!-- ENDIF -->     <!-- ENDIF -->

      </div>

      <!-- IF not postrow.S_IGNORE_POST -->
         <dl class="postprofile" id="profile{postrow.POST_ID}">
         <dt>
                <!-- IF postrow.POSTER_AVATAR -->
                   <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><br /><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="90" height="90" alt="" /><br />
                <!-- ENDIF -->
            <!-- We use "\r\n" newline here because insert_text() JS function doesn't insert newline with "\n" (at least in Windows) -->
            <!-- IF QUICK_REPLY --><a href="#postform" onclick="insert_text('[color={postrow.POST_AUTHOR_COLOUR}][b]{postrow.POSTER_QUOTE}[/b]:[/color]\r\n'); return false;"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}" <!-- ENDIF -->>{postrow.POST_AUTHOR}</a><!-- ELSE --><!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF --><!-- ENDIF -->
         </dt>

                  <!-- IF postrow.CUSTOM_TITLE or postrow.RANK_TITLE or postrow.RANK_IMG --><dd><strong>{postrow.CUSTOM_TITLE}</strong><!-- IF postrow.CUSTOM_TITLE and postrow.RANK_TITLE or postrow.CUSTOM_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->

      <dd>&nbsp;</dd>

      <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
      <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
      <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->

      <!-- IF postrow.S_PROFILE_FIELD1 -->
         <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
         <dd><strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
      <!-- ENDIF -->

   

      <!-- IF not S_IS_BOT -->         <!-- IF postrow.POSTER_WARNINGS --><dd><strong>{L_WARNINGS}:</strong> {postrow.POSTER_WARNINGS}</dd><!-- ENDIF -->
      <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM -->
         <dd>
            <ul class="profile-icons">
               <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF -->
               <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
            </ul>
         </dd>
      <!-- ENDIF -->         <!-- IF .postrow.warnings --><dd><!-- BEGIN warnings --><div title="{L_WARNINGS}" style="float:right;margin-left:2px;width:20px;height:20px;line-height:20px;text-align:center;background:url('{T_THEME_PATH}/images/warning_card.gif') no-repeat 50%;cursor:default;">{postrow.warnings.COUNT}</div><!-- END warnings --></dd><!-- ENDIF -->
      <!-- ENDIF -->

      </dl>
   <!-- ENDIF -->

      <div class="back2top"><a href="{U_VIEW_TOPIC}#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>

      <span class="corners-bottom"><span></span></span></div>
   </div>
   
             <!-- IF postrow.S_ROW_COUNT == 0 or postrow.S_ROW_COUNT == 7 -->
    <div id="google" class="panel online">
          <div class="inner"><span class="corners-top"><span></span></span>

          <div class="postbody">

                <ul class="profile-icons">
                    <li class="info-icon"><a href="#" title="Information"><span>Donate</span></a></li>
                </ul>

             <h3>Google Adsense.</h3>
             <script type="text/javascript"><!--
google_ad_client = "pub-3459436309807785";
/* Text Ad Pocky Scheme 468x60, created 3/23/08 */
google_ad_slot = "9892257275";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
   

          </div>

             <dl class="postprofile" id="profile">
             <dt>
                <a href="#"><img src="{T_THEME_PATH}/images/google.gif" alt="google" /></a><br />

                <a href="#" style="color:#1845ad;"><span class="style3">G</span><span style="color:#FF0000;">o</span><span style="color:#c69e00;">o</span><span class="style3">g</span><span style="color:#31b639;">l</span><span style="color:#FF0000;">e</span></a></dt>

          <dd>&nbsp;</dd>

          </dl>

          <div class="back2top"><a href="#wrap" class="top" title="Top">Top</a></div>

          <span class="corners-bottom"><span></span></span></div>
    </div><!-- ENDIF -->

   <hr class="divider" />
   <!-- IF AD_CODE2 -->
   <div class="post bg3">
   <div class="inner"><span class="corners-top"><span></span></span>
   <div align="center">{AD_CODE2}</div>
   <span class="corners-bottom"><span></span></span></div></div>
   <!-- ENDIF -->
   
   <!-- IF postrow.S_FIRST_ROW == 2 -->
   <!-- IF AD_CODE1 and not AD_CODE2 -->
   <div class="post bg3">
   <div class="inner"><span class="corners-top"><span></span></span>
   <div align="center">{AD_CODE1}</div>
   <span class="corners-bottom"><span></span></span></div></div>
   <!-- ENDIF -->
   <!-- ENDIF -->
<!-- END postrow -->
<!-- IF AD_CODE4 -->
<div class="post bg3">
<div class="inner"><span class="corners-top"><span></span></span>
<div align="center">{AD_CODE4}</div>
<span class="corners-bottom"><span></span></span></div></div>
<!-- ENDIF -->

<!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE -->
   <form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">

   <fieldset class="display-options" style="margin-top: 0; ">
      <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
      <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
      <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
      <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
   </fieldset>

   </form>
   <hr />
<!-- ENDIF -->

<div class="topic-actions">
   <div class="buttons">
   <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
      <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>    <div class="post-icon"><a href="{U_POST_NEW_TOPIC}" title="{L_POST_TOPIC}" accesskey="n"><span></span></a></div>
   <!-- ENDIF -->
   </div>

   <!-- IF PAGINATION or TOTAL_POSTS -->
      <div class="pagination">
         {TOTAL_POSTS}
         <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
      </div>
   <!-- ENDIF -->
</div>
<!-- IF QUICK_REPLY --><!-- INCLUDE quick_reply.html --><!-- ENDIF -->
<!-- INCLUDE jumpbox.html -->

<!-- IF S_TOPIC_MOD -->
   <form method="post" action="{S_MOD_ACTION}">
   <fieldset class="quickmod">
      <label>{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" />
      {S_FORM_TOKEN}
   </fieldset>
   </form>
<!-- ENDIF -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
   <h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
   <p>{LOGGED_IN_USER_LIST}</p>
<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->

Thank you very much.
User avatar
anne
Supporter
Supporter
 
Posts: 84
Joined: 07 Nov 2007, 20:41
Gender: Female

Re: Adding online/offline message in signature

Postby poppertom69 » 24 Mar 2008, 03:39

Very nice stich your getting better and better at this coding stuff!! will look at this later!
Image
Image
poppertom69    
Supporter
Supporter
 
Posts: 326
Joined: 13 Apr 2007, 08:08
Location: bucks, UK
Favorite Team: STG
Gender: Male
phpBB Knowledge: 8

Next

Return to Tutorials and How-Tos

Who is online

Users browsing this forum: No registered users and 8 guests