CainFool Posted July 23, 2009 Share Posted July 23, 2009 Annoying.. isn't it.. having to go into the header.php file and changing a tip of the day all the time, now you don't have to login to your websites control panel! I've created a user-friendly header text generator which simply, under your "Donate to Game_Name now for benefits" add's some text with a nice div background. This is my first modification, feel free to edit as you need, just remember to give me credit. SQL You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open up header.php and find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add underneath You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. note: replace my tablediv pic if you wish. open up staff_special.php and find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add underneath: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. CONTINUED NEXT POST.. Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 23, 2009 Author Share Posted July 23, 2009 Re: [mcCodes v2] Header Text Search for: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add underneath: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open up staffmenu.php and add amongst your links: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And you're done. Screenshots will be here shortly. Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 23, 2009 Author Share Posted July 23, 2009 Re: [mcCodes v2] Header Text That's the page where you edit it, nothing fancy. That's what it will look like below your logo and that's it. credit goes to me, this is my first script so, it's good for beginners, isn't it? Quote Link to comment Share on other sites More sharing options...
Miniman Posted July 23, 2009 Share Posted July 23, 2009 Re: [mcCodes v2] Header Text Instead of making a new DB table, you could of inserted it into settings or something :-) Looks good though. Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 23, 2009 Author Share Posted July 23, 2009 Re: [mcCodes v2] Header Text [First ever Mod] True, im alot better with Databases though. :) Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 23, 2009 Author Share Posted July 23, 2009 Re: [mcCodes v2] Header Text [First ever Mod] I hope some people use this in their game. :) I would feel awesome, I couldnt sleep the other night so I thought why not make a Mod, I never tried so I tried today, and I completed. Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 24, 2009 Author Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] BUMP- come on, post and comment Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 24, 2009 Author Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] bump Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Nice i made one like this but it was a marquee and the field was in the table settings Quote Link to comment Share on other sites More sharing options...
Mike09 Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Nice mod but here is something to optimize it. Open staff.php Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Under add: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Run SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then in header under You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Plain and simple :-) Quote Link to comment Share on other sites More sharing options...
CrazyT Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Nice mod but here is something to optimize it. Open staff.php Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Under add: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Run SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then in header under You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Plain and simple :-) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. What about if someone get's admin some how then they guna use meta refresh or something like everyone else does. lol. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Mike09 Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Thats why you secure your game and dont let assholes be admin? xD Quote Link to comment Share on other sites More sharing options...
CrazyT Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Thats why you secure your game and dont let assholes be admin? xD lol true ;) Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 24, 2009 Author Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Anyway you modify it, you can do it as you wish. Just under your game add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. :) I will be having many ways of improving it and your ideas will be used, and if it's seriously fantastic, like a months work into it, it will be available for a cheap price. (like, 0.40) lol Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 24, 2009 Author Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] :roll: i'm actually having slight bugs, i'm sure it's very fixable. In the edit header code, the box submits and all, that's fine. im trying to work out how for it to already display what has been entered into the mysql, any help? I'm sure it's small. function header_announcement() { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT text FROM header LIMIT 1"); $news=$db->fetch_single($q); print "<h3>Editing Header</h3> <form action='staff_special.php?action=head_submit' method='post'> <textarea rows='7' cols='35' name='newspaper2'>$text</textarea> <input type='submit' value='Change' /></form>"; } I'm nearly sure it's something to do with that, correct if im wrong. Quote Link to comment Share on other sites More sharing options...
CrazyT Posted July 24, 2009 Share Posted July 24, 2009 Re: [mcCodes v2] Header Text [First ever Mod] :roll: i'm actually having slight bugs, i'm sure it's very fixable. In the edit header code, the box submits and all, that's fine. im trying to work out how for it to already display what has been entered into the mysql, any help? I'm sure it's small. function header_announcement() { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT text FROM header LIMIT 1"); $news=$db->fetch_single($q); print "<h3>Editing Header</h3> <form action='staff_special.php?action=head_submit' method='post'> <textarea rows='7' cols='35' name='newspaper2'>$text</textarea> <input type='submit' value='Change' /></form>"; } I'm nearly sure it's something to do with that, correct if im wrong. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If that is what your on about? Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 25, 2009 Author Share Posted July 25, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Look at it again, where it says $text inside the textarea code, Iwant it to come up with the details i've already entered in the mysql table. Quote Link to comment Share on other sites More sharing options...
CrazyT Posted July 25, 2009 Share Posted July 25, 2009 Re: [mcCodes v2] Header Text [First ever Mod] Look at it again, where it says $text inside the textarea code, Iwant it to come up with the details i've already entered in the mysql table. Yes and it does that... lol Quote Link to comment Share on other sites More sharing options...
CainFool Posted July 31, 2009 Author Share Posted July 31, 2009 Re: [mcCodes v2] Header Text [First ever Mod] yes I did get it working eventually. Quote Link to comment Share on other sites More sharing options...
DeathXXX Posted February 18, 2014 Share Posted February 18, 2014 right for some reason the SQL don't work I put this in the SQL CREATE TABLE IF NOT EXISTS `header` ( `text` longtext NOT NULL, ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `header` -- INSERT INTO `header` (`text`) VALUES ('<b>Congratulations, Nameless_!</b> \r\nYou are the co-owner <img src="images/smilies/wink.png" border="0" alt="" title="Wink" class="inlineimg" /> '); AND I GET THIS ERROR: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 4 WHATS WRONG? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2014 Share Posted February 18, 2014 right for some reason the SQL don't work I put this in the SQL CREATE TABLE IF NOT EXISTS `header` ( `text` longtext NOT NULL, ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `header` -- INSERT INTO `header` (`text`) VALUES ('<b>Congratulations, Nameless_!</b> \r\nYou are the co-owner <img src="images/smilies/wink.png" border="0" alt="" title="Wink" class="inlineimg" /> '); AND I GET THIS ERROR: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 4 WHATS WRONG? a) You have a comma after the text b) Using Latin1 is a no no. Quote Link to comment Share on other sites More sharing options...
DeathXXX Posted February 18, 2014 Share Posted February 18, 2014 so I remove the coma from NOT NULL and shell I changed the charset to ? if latins bad? angel add me on Skype Dylan-coleman2 so we cn speak easyer Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2014 Share Posted February 18, 2014 so I remove the coma from NOT NULL and shell I changed the charset to ? if latins bad? angel add me on Skype Dylan-coleman2 so we cn speak easyer No I won't add you on skype for you to spam me with questions, read up on charsets and decide for yourself Quote Link to comment Share on other sites More sharing options...
jcvenom Posted February 18, 2014 Share Posted February 18, 2014 No I won't add you on skype for you to spam me with questions, read up on charsets and decide for yourself Thumbs up :) Quote Link to comment Share on other sites More sharing options...
Raven1992 Posted February 20, 2014 Share Posted February 20, 2014 very nice mod easy to add cheera for that +1 for the mod and +1 for angel and her comment Quote Link to comment Share on other sites More sharing options...
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.