Skin Support - NBS






 

 

Skin Support - NBS

View Full Version : Skin Support


Greenhouse
05-Nov-2002, 03:31 PM
// Simple Text Offline/Online Hack by: Shadow
Fox
//
// This hack will show the users Offline/Online status in
their posts right below their "Joined Date Info"
//
//
Thanks go to monster for the original Online/Offline mod
//
//
Supplied and supported by Shadow Fox (Invision@xtrea.com) - If you
need help with this mod
// Look for the Support Thead in the
"Modification Support" on
[URL=http://www.ibresource.com]http://www.ibresource.com[/URL]
 


================================================== =====================//
Step
1 - Download and Backup > Skin/s1/skin_topic.php      
                   
 
                 
          > lang/en/lang_Topic.php
 
                   
      >
sources/Topics.php
================================================== =====================//

---------------------------------------------------------------------
Open
Skin/s*/skin_topic.php AND FIND THE FOLLOWING (around line
146)
---------------------------------------------------------------------


           
{$data[POSTER]['member_joined']}<br>

--------------------------------------------------------------------
ADD
THE FOLLOWING LINE RIGHT "BELOW"
THAT
--------------------------------------------------------------------


&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;{$data[POSTER]['member_status']}<br>

================================================== =====================//
Step
2 : Save And Close Skin/s*/skin_topic.php

================================================== =====================//

--------------------------------------------------------------------
Open
lang/en/lang_topic.php AND FIND THE FOLLOWING (around line
23)
--------------------------------------------------------------------

'edited_by'
&nbsp; => "This post has been edited by <b>%s</b>
on
%s",

--------------------------------------------------------------------
ADD
THE FOLLOWING LINES RIGHT "BELOW"
THAT
--------------------------------------------------------------------

'M_Online'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> &nbsp;"Status:
Online",
'M_Offline' &nbsp; &nbsp; &nbsp; &nbsp; =>
&nbsp;"Status:
Offline",

================================================== =====================//
Step
3 : Save And Close lang/en/lang_topic.php

================================================== =====================//

--------------------------------------------------------------------
Open
sources/Topics.php AND FIND THE FOLLOWING (around line
538)
--------------------------------------------------------------------

//
Get the member info. We parse the data and cache
it.

--------------------------------------------------------------------
ADD
THE FOLLOWING LINES RIGHT "ABOVE"
THAT
--------------------------------------------------------------------

$t_time
= time() - 900;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;$query = mysql_query("SELECT member_id
FROM ibf_sessions WHERE member_id!='0' AND
member_id='$row[author_id]' AND login_type <>
1 AND running_time>'$t_time'") or print
mysql_error();
&nbsp; $status =
mysql_num_rows($query);
&nbsp;
&nbsp; if
($status > 0)
&nbsp; {
&nbsp;
$row['member_status'] =
$ibforums->lang['M_Online'];
&nbsp;
}
&nbsp; else
&nbsp; {
&nbsp;
$row['member_status'] =
$ibforums->lang['M_Offline'];
&nbsp;
}

================================================== =====================//
Step
4 - Save and Close
sources/Topics.php
================================================== =====================//

--------------------------------------------------------------------
Now
Upload all three files that you edited back to their proper
locations
--------------------------------------------------------------------


&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;>
Skin/s1/skin_topic.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;> lang/en/lang_Topic.php

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;>
sources/Topics.php

================================================== ===================

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Your Finished, use and
enjoy
:)
================================================== ===================


now I'm using the metaldark
skin.
and have a problem to fully instal the
hack:Skin/s*/skin_topic.php
thad fille is not installed by the
skin.
Is there a way to make the hack work anyway?
It worked on the
standard skin

Greenhouse
08-Nov-2002, 07:36 PM
Common??, where can I fint the skin_topic.php fille?
The Mid-Night
Metal skin dos not import filles in skin/*S
so where can i find
it?
Please help.

I need to be ayble to instal the hack

zxoltar
08-Nov-2002, 09:37 PM
does
your server have safemode on.

if it does then you couldn't
import the skin normally and your board is running with safemode set to
on.

and the php files won't be created when you manually
install the skin.

the php files in the skin directorys only get
created if you import the skin normally.

I have every skin from
this site installed locally, and each one has the skin_topic.php with
it.


those php files are created on the import by taking the
info from the templates.html file in the skin download.

zxoltar
08-Nov-2002, 10:05 PM
the
code in the skin_topic.php can be found by goin into you admin
cp

skins/skin templates/ manage html/ then scroll down till you
see: Topic View Section
click on that and it will expand to show the
individual sections, which are really just the function names inside the
skin_topic.php file

now find where it says render row, and to the
right click on edit
the next window displays the code, just scroll
down and you will see where to insert your hack.

Greenhouse
09-Nov-2002, 11:43 AM
Thank! :o