Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Custom Online Location For A Specified User
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Custom Online Location For A Specified User
This is a simple way to add a custom online location for a specified user using Template Conditionals or PHP in Templates / Complex Templates plugin:

online_row template:
Find:

Code:
{$location}

Replace with:

Code:
<if $user['uid'] == 1 then>Sleep<else>{$location}</if>

Modify it as our needs.

member_profile_online template:
Find:

Code:
{$location} @ {$location_time}


Replace with:

Code:
<if $memprofile['uid'] == 1 then>Sleep<else>{$location} @ {$location_time}</if>

Modify it as our needs.


04-07-2011 03:43 AM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #2
RE: Custom Online Location For A Specified User
Very good RateU

[Image: selenab.png]
05-16-2011 12:42 AM
Find all posts by this user Quote this message in a reply
terzier Offline
Member
***
Posts: 91
Joined: Feb 2012
Post: #3
RE: Custom Online Location For A Specified User
<!-- edit SOLVED -->


Attached File(s) Thumbnail(s)
   

Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
(This post was last modified: 06-15-2013 04:12 AM by terzier.)
05-22-2012 08:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Custom Online Location For A Specified User
No, I wouldn't use Template Conditionals for that.

My Blog
05-22-2012 09:41 AM
Find all posts by this user Quote this message in a reply
terzier Offline
Member
***
Posts: 91
Joined: Feb 2012
Post: #5
RE: Custom Online Location For A Specified User
<!-- edit SOLVED -->

Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
(This post was last modified: 06-15-2013 04:12 AM by terzier.)
05-22-2012 01:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Custom Online Location For A Specified User
You could theoretically do almost anything with PHP in Templates, but rearranging data simply doesn't make any sense to be done from a template.
A template just puts out HTML, and HTML doesn't magically rearrange itself into groupings.

I suggest you review your phobia of plugins.

My Blog
05-22-2012 05:36 PM
Find all posts by this user Quote this message in a reply
terzier Offline
Member
***
Posts: 91
Joined: Feb 2012
Post: #7
RE: Custom Online Location For A Specified User
<!-- edit SOLVED -->

Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
(This post was last modified: 06-15-2013 04:11 AM by terzier.)
05-23-2012 01:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Custom Online Location For A Specified User
There is something better to do with a plugin Smile

05-23-2012 05:47 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #9
RE: Custom Online Location For A Specified User
What the hell with all the monkeys? but why???

Yes, some things are good as core edits others not, and plugins are not bad - though some can be coded without full care and attention. Those are the ones to avoid as they can cause problems on your board.


[Image: leelink.gif]
MYBB1.6 & XThreads
05-23-2012 06:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
terzier Offline
Member
***
Posts: 91
Joined: Feb 2012
Post: #10
RE: Custom Online Location For A Specified User
<!-- edit SOLVED -->

Un-Official MyBB from Indonesia| Facebook Page|Twitter
GARUDA DIDADA KU
(This post was last modified: 06-15-2013 04:11 AM by terzier.)
05-23-2012 02:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: