Guest Anonymous Posted April 15, 2008 Posted April 15, 2008 This, I'm sure has been done before, however I just I'd post my version... Nothing special really, just a little set of colorful icons above the menu as indicators. When you "mouse-over" each icon you get a little descriptive tooltip. There are icons for : Announcements, Events, Mail, Bank (Standard + Cyber), Job, and Education. It is of course simple to extend... But I will leave that up to you. Screenie and images from http://nyna.co.uk/gallery/ (DBS/MCcode Mods -> Icons) Installation: 1. Upload the 6 small images (glyphs) to an icons folder in your public html folder. 2 . Make the following changes to header.php a) Add the following to the <style>...</style> block: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. b) Add the following line to just after the large print statement in the function userdata() You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. c) Add the following function to the headers class itself: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 8 Lines of code ... Hmm, how's that for small :D Enjoy folks Quote
Akash Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons Love it! Can't wait for the next :-P Quote
Absolute Zero Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons Haha, this is weird. I made the exact same thing yesterday for my game, and I think we got the icons from the same site, seeing I have several of the ones there. Anyway, nice job :) Quote
03laceys Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons sorry nyna great mod but i am havin alot ok troubles adding can you explain (or someone else) where to put these exactualy please. Quote
Haunted Dawg Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons Add this code in global_func.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add this code where you want to display it: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then by adding this to your header.php <style> tags: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your done. Quote
Guest Anonymous Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons Wrong... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. display_icons() returns a void - not valid text display_icons should explicitly be in the headers class - hence the use of $this-> In my view, this is not a global function - it's specific to the display headers, hence it's location Quote
Dylan Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons Nyna...I love your work but I can't find the headers..class can you help me? Quote
Guest Anonymous Posted April 15, 2008 Posted April 15, 2008 Re: Free 2 - Icons It's 8 lines - how complex can that be? My instructions are plain .. read through them carefully, ignore Killah's post, he's obviously got the wrong end of the stick. I can't tell you *exactly* where to put things - I don't have access to your source code. I suspect you have all modified your source files rather a lot (at least I hope so). Quote
Dylan Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons Well I installed everything I'm having trouble on knowing were to place the... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
03laceys Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons place that where the functions are, you dont want the <?php and ?> Quote
Dylan Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons hmm okay I'll take them out and try it thanks!! Quote
Dylan Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons I made the file "Icons" and it would not load them..I uploaded to "Images" and it works perfect Quote
Dylan Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Thats how I have mine set up..but it is not showing pictures now..on images should I add /images/? Quote
Guest Anonymous Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons Modifications to headers.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This may be different on your system ... I don't know. I have no idea what changes you have made (or for that matter how different my version is from the original) Quote
Tezza` Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons yay i got working :P, before i seen your post aswell :P Quote
Haunted Dawg Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons Why not just make it a global func and allow them to put where ever they want? like You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then to display: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Would be much easier. Quote
Dave Posted April 16, 2008 Posted April 16, 2008 Re: Free 2 - Icons Thanks nyna you guys its well easy to add Quote
asinan007 Posted April 17, 2008 Posted April 17, 2008 Re: Free 2 - Icons hey nyna, i tried that in ma game which is mccodes v2. but the icons won't show, but the text is there to be seen. i've created an "icons" folder as well and placed all the icons in the folder. can u help me and lemme know what i did wrong. cause everything had been set as u've mentioned above. Quote
Tezza` Posted April 17, 2008 Posted April 17, 2008 Re: Free 2 - Icons I got the same problem, what i did was change the folder name to images and then in the code its self change the directory or images/blah.png instead of icons/blah.png hope this help :) Quote
asinan007 Posted April 17, 2008 Posted April 17, 2008 Re: Free 2 - Icons ok cool thanx mate... it does work perfectly now. Quote
shedh Posted April 17, 2008 Posted April 17, 2008 Re: Free 2 - Icons I have a problem all i get is this: (Array); here i my codes: style: #icons { text-align:center; } #icons img { padding:0 2px; } Display: $this->display_icons($ir); Global_func: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. heres a link to a screenshot of the problem: http://www.icons.crimsonville.com/prob/icons_mod.png Quote
Guest Anonymous Posted April 17, 2008 Posted April 17, 2008 Re: Free 2 - Icons Well assuming a) you have not changed the contents of the function display_icons() b) you are running on a V2 system c) have placed the display_icons() function in the headers class as instructed Then there is a problem... But as you have not posted your code -- only the bits that I created, I can't tell what the problem is... As a hint... true adding a line as the last line in display_icons() : You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If your output does not change, then you are not calling display_icons() correctly. btw. global_func is NOT the place to put this function... there is good reason for having it in the headers class. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.