Jump to content
MakeWebGames

Header Text [First ever Mod]


CainFool

Recommended Posts

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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest Sniko`

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

Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 4 years later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...