You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 33 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How to add "nuke tags" to messages/news posts ? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 6:56 am Reply with quoteBack to top

I was wondering how i would add "nuke tags" to messages/news posts.
For instance if i wanted it to say Welcome <username> site description....
i know the tag is something like $theuser but it displays as $theuser and i want it to be 'translated'. so how would i do that?
Find all posts by kskdevilView user's profileSend private message
simrin
Support Mod
Support Mod


Joined: Jul 17, 2003
Posts: 520

Location: In front of a computer, who wants to know

PostPosted: Mon Aug 30, 2004 7:14 am Reply with quoteBack to top

There is no tag for username as far as I know. You have to decode the user cookie and pull the username out. I believe it is at index 1.

Hence:

Code:

global $user;
cookiedecode($user);
$username = $cookie[1];

My index may be wrong I know uid is 0 but I can't remember the others.

You then have to use that in the code that displays what you are looking for ie.

Code:

print "<title> Welcome " .  $username . " to Nukecops, Enjoy your visit</title>";

_________________
NC Support Mod

Are you there? No I am a figment of your imagination.

www.hostileguild.net
Find all posts by simrinView user's profileSend private messageSend e-mailVisit poster's website
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 7:24 am Reply with quoteBack to top

so where would i add the code?
Code:
global $user;
cookiedecode($user);
$username = $cookie[1];

or do i not need to add it
Find all posts by kskdevilView user's profileSend private message
simrin
Support Mod
Support Mod


Joined: Jul 17, 2003
Posts: 520

Location: In front of a computer, who wants to know

PostPosted: Mon Aug 30, 2004 7:29 am Reply with quoteBack to top

It depends what you are trying to do. A lot of files have done this already. What exactly are you trying to do?

_________________
NC Support Mod

Are you there? No I am a figment of your imagination.

www.hostileguild.net
Find all posts by simrinView user's profileSend private messageSend e-mailVisit poster's website
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 7:32 am Reply with quoteBack to top

You know this site has a message box at the top saying "useful tolls....." well i want to display the username in one of those boxes.
Find all posts by kskdevilView user's profileSend private message
simrin
Support Mod
Support Mod


Joined: Jul 17, 2003
Posts: 520

Location: In front of a computer, who wants to know

PostPosted: Mon Aug 30, 2004 7:39 am Reply with quoteBack to top

You just need to find the module that has that code in it and have it display the username then and if you don't have access to the username you need to use the above code to get it. You can also (if you already have the user_id) do a query out of the user table.

_________________
NC Support Mod

Are you there? No I am a figment of your imagination.

www.hostileguild.net
Find all posts by simrinView user's profileSend private messageSend e-mailVisit poster's website
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 8:12 am Reply with quoteBack to top

do u know what module displays the Messages?
Find all posts by kskdevilView user's profileSend private message
simrin
Support Mod
Support Mod


Joined: Jul 17, 2003
Posts: 520

Location: In front of a computer, who wants to know

PostPosted: Mon Aug 30, 2004 8:47 am Reply with quoteBack to top

Still not sure which feature you are talking about so not really Smile

_________________
NC Support Mod

Are you there? No I am a figment of your imagination.

www.hostileguild.net
Find all posts by simrinView user's profileSend private messageSend e-mailVisit poster's website
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 9:18 am Reply with quoteBack to top

Well eh the "Administration Menu > Messages" thing thats wot i'm talking about.
Find all posts by kskdevilView user's profileSend private message
kskdevil
Nuke Cadet
Nuke Cadet


Joined: Aug 25, 2004
Posts: 6


PostPosted: Mon Aug 30, 2004 10:38 am Reply with quoteBack to top

Nevermind i found it Very Happy
Find all posts by kskdevilView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.630 Seconds - 32 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::