PDA

View Full Version : MPDev's Graffiti Wall


MPDev
10-11-2005, 10:00 PM
The Graffiti Wall is a simple script where people can "paint" text onto a brick wall. You can see an example of the vB3 integration on ExtremeFitness.Com (http://www.extremefitness.com/forum/wall.php).

I also use an img src with half sized dimensions to preview the wall on my Summary page which can be seen on ViperAlley.Com (http://www.viperalley.com/index.php); this could also be added to your portal pages for greater exposure.

Features
. Fully integrated with vB3 for styles/users
. Admin/Mods can "wipe board"
. Optional logging of paints to log file

This is a very simple mod to install; there is one self contained .php script, a few fonts and a bricks.jpg file to upload.

Requirements
. Your server must have GD2 support (GD1 support may work, but not tested) for PNG files including TTF support.

This is the updated mod from the 3.0x version located here (https://vborg.vbsupport.ru/showthread.php?t=80588&page=1&pp=15).

Be kind and click INSTALL if you use this mod. :)

1.0.1 - 2/3/2006
. Fixed painttext issue in ZIP file

Blaine0002
10-12-2005, 08:05 PM
sweet hack! thanks!

DS MrSinister
10-12-2005, 08:24 PM
nice i will install in a few. thxs

Allan
10-12-2005, 08:56 PM
Thanks for this Hack :)

very nice ;)

Click Install

Next-Selection
10-12-2005, 09:08 PM
Awesome !!!

thedvs
10-12-2005, 09:11 PM
this is awesome, its a pity we cant actually write the text/choose colors with our mouse, maybe even draw pix? :)

Andyrew
10-12-2005, 09:23 PM
So what am i doing wrong

All i get is

Warning: imagettfbbox(): Could not find/open font in /wall.php on line 117

Warning: imagettftext(): Could not find/open font in /wall.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/airgunt/public_html/forums/includes/class_core.php:2903) in /wall.php on line 136

b6gm6n
10-12-2005, 09:25 PM
coool dadio!

-b6

vau7
10-12-2005, 09:27 PM
Thanks, my Users (a Rapboard) are loving it since the first version!

Allan
10-12-2005, 09:39 PM
don't work for me (vB 3.5 gold)

tested with FF et IE

thedvs
10-12-2005, 09:41 PM
yes ive done all my edits, right dirs etc, chmods, and its hanging
using 3.5gold with GD2 active

b6gm6n
10-12-2005, 09:57 PM
I just have "Fatal error: Call to undefined function: imagettfbbox() in /home/sgurlorg/public_html/forums/wall.php on line 117" :(

-b6

TTG
10-12-2005, 10:11 PM
don't work for me (vB 3.5 gold)

tested with FF et IE

Same problem here :disappointed:

Anyone got this to work yet ?

Dream
10-12-2005, 10:53 PM
got a "redirection limit for this webpage exceeded", maybe my gd2 doesnt support something?

and the line numbers in the readme.txt are wrong

b6gm6n
10-12-2005, 11:37 PM
I just have "Fatal error: Call to undefined function: imagettfbbox() in /home/sgurlorg/public_html/forums/wall.php on line 117" :(

-b6

Gotta have 'freetype' installed with GD i guess, thats my problem...pity

-b6

Daniel
10-12-2005, 11:47 PM
/me clicks install

Very nice! HOTM!

ReadOrDie
10-13-2005, 01:15 AM
Please provide screenshots.

DS MrSinister
10-13-2005, 01:17 AM
I am getting a blank page..

u can see for yourself. :(

Must did something wrong.


http://www.sinisterslair.com/forums/wall.php

Daniel
10-13-2005, 01:21 AM
Please provide screenshots.
There's something better than screenshots, a demo!
http://www.mpdev.net/wall.php

And I'm getting this: Fatal error: Call to undefined function: imagettfbbox() in /home/nikzad0/public_html/forum/dr/wall.php on line 117

I did everything correctly, I think :surprised:

murrtex
10-13-2005, 01:38 AM
I am getting a blank page..

u can see for yourself. :(

Must did something wrong.


http://www.sinisterslair.com/forums/wall.php

me too :(

http://www.4umturk.com/forum/wall.php

and than it says

Fatal error: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /home/httpd/vhosts/4umturk.com/httpdocs/forum/wall.php on line 94

what does it mean?

Dream
10-13-2005, 02:21 AM
me too :(

http://www.4umturk.com/forum/wall.php

and than it says

Fatal error: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /home/httpd/vhosts/4umturk.com/httpdocs/forum/wall.php on line 94

what does it mean?

that address gives me the same error im getting... it redirects to the same page and expires... thats on firefox 1.0.6

utw-Mephisto
10-13-2005, 02:46 AM
yes ive done all my edits, right dirs etc, chmods, and its hanging
using 3.5gold with GD2 active

same here

rb290
10-13-2005, 03:07 AM
Some help please, it says Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thug/public_html/wall.php on line 39

Allan
10-13-2005, 07:44 AM
waiting .... :p

b6gm6n
10-13-2005, 12:24 PM
well my host enabled TTF & FT with GD, now the page just hangs and expires...bugger! :)

-b6

eXtremeTim
10-13-2005, 12:44 PM
One problem is the use of isset is not workign on all server setups as intended. Like it smacks mine into trying to update the wall everytime which I feel is what is happening to others.

heres how I fixed the blank page and timeout problem on my site


Fixed I had the variable typed wrong.


Find:

if( isset($painttext) )


Replace with:

if ($painttext != '')

thedvs
10-13-2005, 01:03 PM
that kinda fixed the hanging, but now nothing writes to it when you enter some text

eXtremeTim
10-13-2005, 01:18 PM
link and test accoutn

murrtex
10-13-2005, 02:08 PM
yes.picture ande page came now..but i can not sent the writing..

http://www.4umturk.com/forum/wall.php

eXtremeTim
10-13-2005, 03:42 PM
yes.picture ande page came now..but i can not sent the writing..

http://www.4umturk.com/forum/wall.php

an account would help ;)

murrtex
10-13-2005, 03:53 PM
user name : testuser
pass : 123456

rb290
10-13-2005, 04:14 PM
Some help please, it says Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thug/public_html/wall.php on line 39


anyone know what I did wrong ^

eXtremeTim
10-13-2005, 04:47 PM
anyone know what I did wrong ^

Post lines 30-41 please.

eXtremeTim
10-13-2005, 05:24 PM
I also fixed the fix I posted earlier I type the variable name wrong.

Just a note to mpdev. I would not use isset becuase it wont work like you want. Since you are setting the variable to be the gpc validated info the isset for that variable will always return true. Since isset just checks to see if a variable is defined.

All the people having problems with the script never loading is becuase its sending them into an infinate loop.

DS MrSinister
10-13-2005, 05:36 PM
ok the blank page is fixed but i cant panit anything to my wall.

thxs m8!

:(

Might have a setting wrong still any ideas.

http://www.sinisterslair.com/forums/wall.php

test
test

thedvs
10-13-2005, 06:06 PM
@eXtremeTim thanks ET its all working now!

now we need a wall which you can do with your mouse :)

b6gm6n
10-13-2005, 06:07 PM
Find:

if( isset($painttext) )


Replace with:

if ($painttext != '')


worked for me! thanx dude... dunno what the other problems may be for other users but one think might be the actual fonts not being uploaded in Binary... gotta check those things with fonts

-b6

b6gm6n
10-13-2005, 06:08 PM
@eXtremeTim thanks ET its all working now!

anyone got a graffiti.png without the spam on it?

There u go...! (900 px wide though, the 1024 was too wide for me)

For the life of me i cannot get this to work in 24bit PNG mode, 8bit yes, but the letters look pixelated...damn...need a blank stat!

There's no program i have that'll remove that text, i can save it and the bricks show behind (sometimes not, just all black) then i type my text, and it all comes in black... great!

-b6

Kusadasi-Guy
10-13-2005, 06:50 PM
Fatal error: Call to undefined function: imagettfbbox() in /home/xxx/public_html/wall.php on line 117

b6gm6n
10-13-2005, 07:02 PM
Fatal error: Call to undefined function: imagettfbbox() in /home/xxx/public_html/wall.php on line 117

TTF support for GD? uploaded fonts in Binary?

-b6

Kusadasi-Guy
10-13-2005, 07:17 PM
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled

hmm, i think i havent TTF for GD :(

thedvs
10-13-2005, 07:22 PM
@b6 no need to change the pgn file - to get rid of the spam on it just edit the wall.php to your url or whatever then chose wipe wall with any text and it will auto put what you said in wall.php in there.

b6gm6n
10-13-2005, 07:39 PM
@b6 no need to change the pgn file - to get rid of the spam on it just edit the wall.php to your url or whatever then chose wipe wall with any text and it will auto put what you said in wall.php in there.

just found that out!

-b6

b6gm6n
10-13-2005, 07:51 PM
hmm, i think i havent TTF for GD :(

My host installed for me, ask yours, maybe they would...

anyone know why on the wall if you type anything with a space inbetween is shows like this "wheresmyspacesgone"?

-b6

Feckie (Roger)
10-13-2005, 08:08 PM
Fatal error: Call to undefined function: imagettfbbox() in /home/******/public_html/************.com/forum/wall.php on line 117

Can't get this to work.......

Mind you had the same problem with V3.08

bonnmac
10-13-2005, 08:58 PM
a heads up this happens on mine when you want to wipe the wall use to be just tick wipe leave the word box empty and hit paint wall wiped now you have to tick wipewall and TYPE wipe and it cleans wall all the spam also !!! try it also reuploaded the fonts in ascii and bam it worked

rb290
10-13-2005, 10:53 PM
Post lines 30-41 please.

alright here you go:

$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

require("global.php");

$vbulletin->input->clean_array_gpc('p', array(
$pathto = "/home/thug/public_html/wall.php ")
'painttext' => TYPE_STR,
'adminreset' => TYPE_UINT,
));

thedvs
10-13-2005, 11:59 PM
$pathto = "/home/thug/public_html/wall.php ")

should be

$pathto = "/home/thug/public_html")

shouldnt it?

evenmonkeys
10-14-2005, 05:34 AM
Nothing at all is loading. It just sits there for 120 seconds and times out. My site's working fine, but this isn't. I was getting an error earlier, but I fixed it. Something about linking to "efgraffiti.txt" and there isn't even a file like that.

eXtremeTim
10-14-2005, 06:31 AM
There u go...! (900 px wide though, the 1024 was too wide for me)

For the life of me i cannot get this to work in 24bit PNG mode, 8bit yes, but the letters look pixelated...damn...need a blank stat!

There's no program i have that'll remove that text, i can save it and the bricks show behind (sometimes not, just all black) then i type my text, and it all comes in black... great!

-b6

Umm you can just wipe the wall and there is a line in the wall.php fill thats titled something similiar to

$string = "mpdev.net";


I changed that on mine so when I wipe my wall it shows my sites name there. ;)

Hope that will help you get the blank wall that you want. If you change that to $string = ""; then wipe the wall it wont have any text on it.

eXtremeTim
10-14-2005, 06:33 AM
alright here you go:

$vbulletin->input->clean_array_gpc('p', array(
$pathto = "/home/thug/public_html/wall.php ")
'painttext' => TYPE_STR,
'adminreset' => TYPE_UINT,
));

Change that to

$vbulletin->input->clean_array_gpc('p', array(
'painttext' => TYPE_STR,
'adminreset' => TYPE_UINT,
));

$pathto = "/home/thug/public_html";



Nothing at all is loading. It just sits there for 120 seconds and times out. My site's working fine, but this isn't. I was getting an error earlier, but I fixed it. Something about linking to "efgraffiti.txt" and there isn't even a file like that.

I posted a fix to that problem on page 2.

a heads up this happens on mine when you want to wipe the wall use to be just tick wipe leave the word box empty and hit paint wall wiped now you have to tick wipewall and TYPE wipe and it cleans wall all the spam also !!! try it also reuploaded the fonts in ascii and bam it worked

I will make a fix for that and post it on up for you all.

Alien
10-14-2005, 06:50 AM
Thank you SO much for re-releasing this! We really appreciate it!

Dream
10-14-2005, 07:19 PM
Find:

if( isset($painttext) )


Replace with:

if ($painttext != '')


thanks man, that worked

does anyone know how to make the image smaller?

foreverdarkness
10-14-2005, 07:55 PM
thanks man, that worked

does anyone know how to make the image smaller?

You can make the image smaller using a photo program or change it in the wall.php script.

$picwidth = 1024; //line 86 (change to what you want)
$picheight = 600; //line 87 (change to what you want)

rb290
10-15-2005, 02:47 AM
the file is wrong for me i think

"line 38: $pathto = "/path/to/your/forum";
Put the server path to your grattifi/forum directory here

line 105: $string = "mpdev.net";
change to whatever you want for a default text to be put on the wall (or comment out to have no default)

line 127: header("Location: http://www.extremefitness.com/forum/wall.php");
change to the URL for your wall.php"

^ none of those are on the right line
and am I supposed to add those lines are find them and edit the lines ?

Dream
10-15-2005, 06:18 AM
thanks, that didnt work though...

DS MrSinister
10-15-2005, 09:42 AM
MY problem now is when u type something in thn click on paint it. it goes to a blank screen any ideas?

thedvs
10-15-2005, 12:05 PM
@rb290 yes you need to find those lines and edit em

rb290
10-16-2005, 12:32 AM
@rb290 yes you need to find those lines and edit em
alright

this line is on line 45 for me:
"line 38: $pathto = "/path/to/your/forum";

this line is on line 114 for me:
line 105: $string = "mpdev.net";
change to whatever you want for a default text to be put on the wall (or comment out to have no default)

this line is on line 136
line 127: header("Location: http://www.extremefitness.com/forum/wall.php");
change to the URL for your wall.php

the file isnt how your explaining it

MPDev
10-17-2005, 01:00 PM
And I'm getting this: Fatal error: Call to undefined function: imagettfbbox() in /home/nikzad0/public_html/forum/dr/wall.php on line 117

You must have TTF support enabled with your GD library; the script uses TTF (TrueType fonts) to generate the text.

I'll change the isset() to remove it when I do an update.

Sorry I haven't been around as much as I'd like - Baby #5 gets here very soon and I have my hands full! ;)

Allan
10-17-2005, 03:34 PM
Finaly, work with 3.5 gold or not ???

No update MpDev ?

Alien
10-17-2005, 04:31 PM
Yes it does work on 3.5 gold...

Allan
10-17-2005, 04:49 PM
Work but impossible to wipe the wall :(

Alien
10-17-2005, 05:40 PM
He needs to simplify that a bit, but it's not that hard.. The workarounds for that are in this thread and don't prevent the wall from functioning whatsoever.

b6gm6n
10-17-2005, 05:50 PM
Work but impossible to wipe the wall :(

Type any random charecter in the input box and click wipe, it'll work! :)

-b6

Daniel
10-18-2005, 06:29 AM
How can I enable TTF on my server via cpanel?

Allan
10-18-2005, 07:45 AM
Thanks ;)

question?
10-18-2005, 12:04 PM
Warning: imagecreatefrompng(): '/home/khz/public_html/forum/graffiti.png' is not a valid PNG file in /wall.php on line 94

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 98

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 99

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 109

Warning: imagettftext() expects parameter 1 to be resource, boolean given in /wall.php on line 131

Warning: imagepng(): supplied argument is not a valid Image resource in /wall.php on line 133

Warning: imagedestroy(): supplied argument is not a valid Image resource in /wall.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/khz/public_html/forum/includes/class_core.php:2903) in /wall.php on line 136

b6gm6n
10-23-2005, 05:42 PM
How can I enable TTF on my server via cpanel?

No, only host admins can do this, they have to re-install/complile GD

-b6

b6gm6n
10-23-2005, 05:43 PM
Warning: imagecreatefrompng(): '/home/khz/public_html/forum/graffiti.png' is not a valid PNG file in /wall.php on line 94

sounds like your GD isn't upto the job, i.e is an older version or hasn't got TTF support, ask your host to upgrade the GD image libuary

-b6

murrtex
10-23-2005, 07:28 PM
hi. i want to use "Turkish characters" ( ş , ı , ö , ü , ğ , ç ) on the wall.
what should i do?

murrtex
10-25-2005, 10:48 PM
is it possible to create 800x600 graffiti.png??

aranthorn
10-30-2005, 02:02 AM
Fatal error: Call to undefined function: imagecreatefrompng()

odd...

TCM
10-30-2005, 03:03 AM
Fatal error: Call to undefined function: imagecreatefrompng()

odd...

You don't have a sufficient version of GD on your server, I guess.

murrtex
10-30-2005, 05:06 AM
hi. i want to use "Turkish characters" ( ş , ı , ? , ? , ğ , ? ) on the wall.
what should i do?


any idea???

djtheropy
10-30-2005, 09:27 AM
hi,

this is my GD specs
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

i get error
Fatal error: Call to undefined function: imagettfbbox() in /home/just4/public_html/advice/wall.php on line 117 when i try writing/wiping the wall.

am-fs
10-30-2005, 09:34 PM
Warning: imagecreatefrompng(): '/home/khz/public_html/forum/graffiti.png' is not a valid PNG file in /wall.php on line 94

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 98

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 99

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /wall.php on line 109

Warning: imagettftext() expects parameter 1 to be resource, boolean given in /wall.php on line 131

Warning: imagepng(): supplied argument is not a valid Image resource in /wall.php on line 133

Warning: imagedestroy(): supplied argument is not a valid Image resource in /wall.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/khz/public_html/forum/includes/class_core.php:2903) in /wall.php on line 136


Im getting the same thing, i had this on 3.7 with no problem, now with 3.5 i can't get it to work.

nitro
10-31-2005, 12:14 AM
works a treat after the isset fix :)

Excellent be fun fer a bit anyway

* nitro clicks install

am-fs
10-31-2005, 05:03 AM
I Got it, thanks :)

javo
11-01-2005, 05:20 PM
Can someone give me a hand here..
I upgraded to 3.0.5 this morning and my old version of GrafittiWall stopped working so I installed this version..
I havent been able to get it to work at all..
This is the error I am getting..
Warning: imagettfbbox(): Could not find/open font in /wall.php on line 117

Warning: imagettftext(): Could not find/open font in /wall.php on line 131

Warning: imagepng(): Unable to open '/home/mxcrazy/site12/fst/var/www/html/forums/graffiti.png' for writing in /wall.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site12/fst/var/www/html/forums/includes/class_core.php:2903) in /wall.php on line 136

I've made the changes for my site in the php file.. Any ideas?

Detomah
11-01-2005, 06:05 PM
heres how I fixed the blank page and timeout problem on my site


Fixed I had the variable typed wrong.


Find:

if( isset($painttext) )


Replace with:

if ($painttext != '')



Thumbs up from me, that little fix did the job for me. Thanks. :)

Not sure why it stopped working for me in the first place though, i've been running this for ages and on 3.0.7 and it always worked fine before, was only this updated version that had killed it.

Lea Verou
11-01-2005, 06:28 PM
It is really nice but only for the english speaking world :(
There is probably no graffiti font with greek :(

Lea Verou
11-02-2005, 09:22 PM
Installed with some changes in the code so that it supports greek.
I also had to replace those nice graffiti fonts with others that support greek (apparently only a few of those that had greek characters worked out for the wall) :)

javo
11-03-2005, 04:11 PM
Anyone have any idea what might be causing this error?

Fatal error: Call to undefined function: globalize() in /home/virtual/site12/fst/var/www/html/forums/wall.php on line 37

I've tried that edit a few posts up and had no success.

Thanks

Lea Verou
11-03-2005, 04:17 PM
Anyone have any idea what might be causing this error?

Fatal error: Call to undefined function: globalize() in /home/virtual/site12/fst/var/www/html/forums/wall.php on line 37

I've tried that edit a few posts up and had no success.

Thanks

What have you changed in wall.php?

javo
11-03-2005, 06:26 PM
What have you changed in wall.php?


I can PM you my entire wall.php if you want or I can post it out here. Just let me know.. I think I've made all the necessary changes, but possibly I'm missing something..

Lea Verou
11-03-2005, 06:28 PM
I can PM you my entire wall.php if you want or I can post it out here. Just let me know.. I think I've made all the necessary changes, but possibly I'm missing something..

The best thing would be to post it here but I don't know if that's ok with the rules :confused:

javo
11-03-2005, 06:37 PM
I just pm'd it to you..

Thanks

rezovor
11-03-2005, 11:54 PM
My members can erase the wall.....um.. I didnt want that.


if ( can_moderate() ) {
echo<<<INPUTTEXT
<br /><input type="checkbox" name="adminreset" value="1" />&nbsp;Wipe Wall</font>
INPUTTEXT;
}

figuring out this code.

Nice hack though, i like it.

and this code



if ( !file_exists($graffitifile) || ($adminreset == 1 AND can_moderate()) ) {
$myimage = ImageCreate($picwidth, $picheight);
$newimage = 1;
}

What's going on is I have diary moderators and they're the one's causing the trouble, so i'm trying to get the code right so only admin's can erase it.

javo
11-04-2005, 01:00 PM
Can someone please verify that the wall.php file in that package is the correct file.
Loukrhtia said mine looks drastically different than his and the readme mpdev put in there says the pathto edit is on line 38 except my file it's on 45. This may be why I cant get it to work. I may be running the wrong version of the wall.php file. I've downloaded the package several times in the last few days and had the same results.

Thanks..

Of if someone can just pm me the wall.php file I would appreciate it..

Lea Verou
11-04-2005, 03:31 PM
Can someone please verify that the wall.php file in that package is the correct file.
Loukrhtia said mine looks drastically different than his and the readme mpdev put in there says the pathto edit is on line 38 except my file it's on 45. This may be why I cant get it to work. I may be running the wrong version of the wall.php file. I've downloaded the package several times in the last few days and had the same results.

Thanks..

Of if someone can just pm me the wall.php file I would appreciate it..

Firstly, it's hers, not his (Gosh, I hate that!)

Secondly the first lines are drasctically diefferent in mine, not the whole file :)

javo
11-05-2005, 03:11 PM
Firstly, it's hers, not his (Gosh, I hate that!)

Secondly the first lines are drasctically diefferent in mine, not the whole file :)


My bad I'm sorry. :bunny:

Has anyone verified that the file in the current zip is the newest wall.php ?

murrtex
11-18-2005, 11:23 AM
it works great on my site..but otherwise i have another subdomain..and it does not wrok on it...why?

my subdomain wall.php

<?
//////////////////////////// COPYRIGHT NOTICE //////////////////////////////
// This script is a software application written by Michael Pierce. //
// You are free to use this script on your site, but you may not claim //
// the product as your own or redistribute the contents of this ZIP file //
// without express written permission. //
// //
// http://www.mpdev.net packetjunkie@gmail.com //
// //
// GraffitiWall ? 2003-2005, Michael Pierce //
// //
// We are not resposible for any use of this script on your servers. //
////////////////////////////////////////////////////////////////////////////

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'graffiti');
define('NO_REGISTER_GLOBALS', 1);

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

require("global.php");

$vbulletin->input->clean_array_gpc('p', array(
'painttext' => TYPE_STR,
'adminreset' => TYPE_UINT,
));

if ( isset($vbulletin->GPC['painttext']) ) $painttext = $vbulletin->GPC['painttext'];
if ( isset($vbulletin->GPC['adminreset']) ) $adminreset = $vbulletin->GPC['adminreset'];

$pathto = "D:/home/vhosts/4umturk.com/subdomains/18/httpdocs/forum";


if ($painttext != '') {
$string = stripslashes("$painttext");

// You can keep a log of text sent to your wall by uncommenting this section
//$ip = IPADDRESS;
//$fd = fopen("$pathto/efgraffiti.txt","a");
//$debugtext = "$string | $ip | ".$bbuserinfo['username']."\n";
//fwrite($fd, $debugtext);
//fclose($fd);

//$string = ereg_replace( "[^a-zA-Z0-9.!]", "", $string );
$string = strtolower($string);

# feel free to add your own censored words, or put in your own replacements

$string = str_replace( "www", "", $string );

$fonts = array( "skate.ttf", "grand.ttf", "say.ttf", "tagster.ttf", "graffiti.ttf", "inthcity.ttf" );
$pickfont = $fonts[array_rand( $fonts )];
$fontfile = "$pathto/fonts/$pickfont";

$graffitifile = "$pathto/graffiti.png";

if ( $pickfont == "grand.ttf" ) $sizes = array( "16", "18", "20", "22" );
elseif ( $pickfont == "skate.ttf" ) $sizes = array( "12", "14", "16", "18" );
else
$sizes = array( "18", "20", "22" );

$fontsize = $sizes[array_rand( $sizes )];

$angles = array( "0", "5", "15", "20", "30", "-5", "-15", "-20", "-30" );
$textangle = $angles[array_rand( $angles )];

$picwidth = 1024;
$picheight = 600;

if ( !file_exists($graffitifile) || ($adminreset == 1 && can_moderate()) ) {
$myimage = ImageCreate($picwidth, $picheight);
$newimage = 1;
}
else {
$myimage = ImageCreateFromPng($graffitifile);
$newimage = 0;
}

$black = ImageColorAllocate($myimage, 0, 0, 0);
$red = ImageColorAllocate($myimage, 255, 0, 0);

$randcolor = rand(1,9);
if ( $randcolor == 1 ) $color = ImageColorAllocate($myimage, 255, 255, 0);
elseif ( $randcolor == 2 ) $color = ImageColorAllocate($myimage, 255, 165, 0);
elseif ( $randcolor == 3 ) $color = ImageColorAllocate($myimage, 255, 20, 147);
elseif ( $randcolor == 4 ) $color = ImageColorAllocate($myimage, 255, 0, 0);
elseif ( $randcolor == 5 ) $color = ImageColorAllocate($myimage, 255, 255, 255);
elseif ( $randcolor == 6 ) $color = ImageColorAllocate($myimage, 0, 255, 255);
elseif ( $randcolor == 7 ) $color = ImageColorAllocate($myimage, 255, 0, 255);
else $color = ImageColorAllocate($myimage, 0, 255, 0);

if ( $newimage == 1 ) {
ImageFilledRectangle($myimage, 0, 0, $picwidth, $picheight, $black);
ImageColorTransparent($myimage, $black);
$string = "18.4umTurk.com";
}

list($pos_blx, $pos_bly, $pos_brx, $pos_bry, $pos_trx, $pos_try, $pos_tlx, $pos_tly) = imagettfbbox($fontsize, $textangle, $fontfile, $string);
$textwidth = $pos_brx - $pos_blx;
$textheight = $pos_bry - $pos_bly;

do {
$randw = rand(0,($picwidth-20));
} while( (($randw+$textwidth) > $picwidth) );
$start_x = $randw;

do {
$randh = rand(0,($picheight-20));
} while( (($randh+$textheight) > $picheight) || (($randh-$textheight) < 0) );
$start_y = $randh;

imagettftext($myimage, $fontsize, $textangle, $start_x, $start_y, $color, $fontfile, $string);

ImagePng($myimage, $graffitifile);
ImageDestroy($myimage);

header("Location: http://18.4umturk.com/forum/wall.php");
exit;
}

$navbits = array();
$navbits[$parent] = 'Graffiti Wall';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

$styleinclude = process_replacement_vars($styleinclude);
$headinclude = process_replacement_vars($headinclude);
$header = process_replacement_vars($header);
$navbar = process_replacement_vars($navbar);

$vbheader = "$stylevar[htmldoctype]
<html dir=\"$stylevar[textdirection]\" lang=\"$stylevar[languagecode]\">
<head>
<title>18.4umTurk Graffiti Wall - Duvar Yazıları</title>
$styleinclude
$headinclude
</head>
<body>
$header
$navbar";

print $vbheader;


?>
<form method="post" action="wall.php">
<table border="0" cellspacing="0" cellpadding="0" align="center" background="images/bricks.jpg">
<tr>
<td align="left">
<img src="graffiti.png?<? echo rand(10000,99999); ?>">
</td>
</tr>
<?php

if ( $vbulletin->userinfo['userid'] ) {
echo<<<INPUTTEXT
<tr>
<td align="center" class="alt1">
<input type="text" name="painttext" style="font-size: 8pt;" size="25" maxlength="25" value="" />&nbsp;
<input type="submit" value="Paint It!" style="font-size: 8pt;" />
INPUTTEXT;

if ( can_moderate() ) {
echo<<<INPUTTEXT
<br /><input type="checkbox" name="adminreset" value="1" />&nbsp;Wipe Wall</font>
INPUTTEXT;
}

echo<<<INPUTTEXT
</td>
</tr>
INPUTTEXT;
}
?>
</table>
<br />

</form>

<?php
eval('$vbfooter = "' . fetch_template('footer') . '";');
$vbfooter = process_replacement_vars($vbfooter);
$vbfooter = "</div>$vbfooter";

print $vbfooter;
?>



and when i want to write something i get following error;

Warning: imagepng(): Unable to open 'D:/home/vhosts/4umturk.com/subdomains/18/httpdocs/forum/graffiti.png' for writing in \wall.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at D:\home\vhosts\4umturk.com\subdomains\18\httpdocs\ forum\includes\class_core.php:2948) in \wall.php on line 131

and my graffiti.png chmod is 777

b6gm6n
11-25-2005, 02:13 AM
great feature would be once the wall fills up with text, instead of wipeing it take a snapshot of the wall (save image or whatever) and have as a clickable thumb within a wall-archive :)

-b6

Lea Verou
12-06-2005, 02:09 PM
I made a CMPS module for this: https://vborg.vbsupport.ru/showthread.php?t=102343
Hope you like it :)

dan35
12-06-2005, 08:16 PM
Can I limit painting to admin usergroup only?

I just wanna put it as the Wall of Shame for cheaters ;) or Wall of Contributors.

Daniel
12-07-2005, 12:00 AM
Parse error: parse error, unexpected $ in /home/nitronci/public_html/forum/wall.php on line 150

:( any ideas?

docvader
12-28-2005, 06:33 PM
"redirection limit for this url exceeded. Unable to load requested page. This may be caused by cookies that are blocked"

Any ideas??

XtremeOffroad
01-07-2006, 01:15 AM
Doesnt work for me, Page just hangs.

Edit: The fix posted worked Great, Working now.
This needs to be corrected in the zip file.
Clicks Install.

How can we make the wall Smaller?

TheProphet
01-08-2006, 01:53 PM
This hack sucks, too many complications and no support from the author as well, he did not reply a single time here....

Damian
01-08-2006, 03:13 PM
This hack sucks, too many complications and no support from the author as well, he did not reply a single time here....

It states in the release this is not supported.
I suggest you don't attempt to install hacks that are beyond your current skill level.

liljimmy
01-08-2006, 05:24 PM
I cannot get the brick wall to show up for me. ExtremeTim's fix worked, but the text is showing up on a white background. Uploaded bricks.jpg to my images directory. graffiti.png is at 666. Any ideas?

docvader
01-08-2006, 05:26 PM
Yea.
Read the post above.
The hack doesn't work well. Don't deal with it

Damian
01-08-2006, 11:57 PM
How can we make the wall Smaller?

In wall.php change the following to the dimensions you want in pixels.
$picwidth = 1024;
$picheight = 600;

Resize graffiti.png to match the dimensions you added in wall.php

You may have to wipe the wall for the changes to take effect.

Zia
01-30-2006, 06:44 AM
hello..we are trying to install it...but gettinn error

Fatal error: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /www/g/golponet1/htdocs/forum/wall.php on line 94

what to do now?

MPDev
02-03-2006, 11:50 PM
If you don't have GD support enabled, the mod won't work. There is nothing I can do to fix it for you, you need to get GD support enabled.

As for any errors in the zip file, I'll check into it in the next few days and update it if necessary.

Line 150 is blank, so I assume you modified the file in some way that there is a line there which is causing a problem.

Zia
02-08-2006, 04:35 PM
does this extension supported by author or by ano one?

any one success using it?
badly need help..

Fatal error: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /www/g/golponet1/htdocs/forum/wall.php on line 94

its the error msg......any idea ...?

MPDev
02-08-2006, 04:56 PM
Looks like your libpng support is corrupted/not working; try Googling for the error message to see how to fix it.

DS MrSinister
02-08-2006, 05:02 PM
THanks for updating it m8.. works great now.

Zia
02-09-2006, 03:34 AM
THanks for updating it m8.. works great now.

hello....
its wondering...nice mate

hbalagh1
03-07-2006, 02:00 AM
fun idea ;)

drdeathuk69
04-02-2006, 11:04 PM
Great hack but how do i get it to show up at top so i can just click on it to goto the wall instead of typing it in the url bar

www.muppets-clan.com

drdeathuk69
04-03-2006, 02:17 AM
its ok sorted now

phill2003
04-03-2006, 10:01 AM
This is great for a bit of fun thanks :)....

Serial Killer
04-03-2006, 11:37 PM
Hmmm...I really want this mod, but I've had to uninstall as it throws up errors when I try to enter text onto the wall. Also the wall image doesn't resize even when you edit wall.php.

Any chance of anybody improving upon this mod, or updating it for vBulletin 3.5.4?

I don't mind paying...

phill2003
04-04-2006, 04:08 AM
What errors do you get i had a few before i got it to work?

Serial Killer
04-04-2006, 10:38 AM
I get this error. I have GD2 installed and all of my other image resizing/uploading apps, such as PhotoPost, work fine.

I get error
Fatal error: Call to undefined function: imagettfbbox() in /home/username/public_html/community/wall.php on line 117 when i try writing/wiping the wall. :(

Serial Killer
04-04-2006, 07:26 PM
I've fixed it, I've fixed it...or rather my host did.

If you get any of the errors mentioned in this thread, you probably need to get your host to recompile PHP and install freetype and TTF support.

*Burp*

Shaliza
05-15-2006, 02:18 AM
So it fully works with 3.5.4?

phill2003
05-15-2006, 07:36 AM
yes it does, at least it does on mine....

Phalynx
05-15-2006, 08:57 AM
*installed*

Will try this soon.

doggy1
05-31-2006, 08:09 PM
Great hack!!!!!! Thanks for offering it. :)

How do you wipe the wall clean? I put a check mark in wipe wall and and clicked "Paint it" and it didn't clean up????? What do you do to wipe the wall? Thanks.

phill2003
06-01-2006, 04:08 AM
type 'wipe' into the box then tick the wipe box and click go :)

Pamela
06-16-2006, 06:15 AM
*clicks install*

Thanks!!! :banana:

clive lmc
07-21-2006, 08:29 PM
Installed with no issues, thanks for the hack and everyone else who has put time into it.

http://forum.csoc.co.uk/wall.php

y2krazy
08-21-2006, 11:32 PM
Working with 3.6.0 Gold! :)

Pamela
08-25-2006, 06:57 PM
type 'wipe' into the box then tick the wipe box and click go :)


Does anyone know how to avoid this step to just be able to tick the Wipe Wall box and click Paint It, like the last version of this hack (so we don't always have to type the word "wipe")?

It's not that big of a deal (obviously!), but I thought I'd ask in case anyone knew how since the old version was like that...

Thanks! :D

puregraf
09-09-2006, 03:23 AM
You need to create a real graffiti board, that uses real time multi-user javascript so 20 people can be viewing and drawing on the board at the same time, and have it be a big white boad, and have a color pallette of all the colors and differen brush sizes etc.......

with a chat underneath

this would be a big hit!

Guest210212002
10-18-2006, 02:30 PM
Great hack as always bro. :D

* Guest210212002 clicks install

DieselMinded
10-13-2007, 01:56 AM
You need to create a real graffiti board, that uses real time multi-user javascript so 20 people can be viewing and drawing on the board at the same time, and have it be a big white boad, and have a color pallette of all the colors and differen brush sizes etc.......

with a chat underneath

this would be a big hit!

That Sounds Awesome and for 3.6.8 too :)