News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to add a pic/banner on top of my forum?

Started by davidvoyage200, March 27, 2004, 09:23:22 AM

Previous topic - Next topic

davidvoyage200

Hi, I just upgrade from Yabbse to SMF.  However, I found SMF much harder to edit the forum template...because I don't really know PHP.(but I know html and JAVA).

I just want to add a banner on top of my forum:
hxxp:members.lycos.co.uk/beybladesite/yabbse/index.php [nonactive]
(Instead of the big word "BeyBladers Forum", I want to change it to a banner)

What I think I should do is, creating a theme (from the default), and then inside this new theme, there are two important files (styles.css and the main template (index.template.php)). But I don't know where to add my picture:

<img src = blablablab.gif>

Since this is php, when I add this line randomly in index.template.php, I get an error message.
Can somebody tell me in which line I should modify to add my banner?

Thanks

Tomer

Open index.template.php

Find this:

', $context['forum_name'], '

and replace that with

<img src="blablablab.gif">


Im pretty sure thats how, but not postive, keep a backup before just to make sure.

davidvoyage200

#2
Thanks a lot :D it works now for the banner problem ^^

But I have another problem...I got some warnings message for subs.php file:

Click here to see these warning messages:
hxxp:members.lycos.co.uk/beybladesite/yabbse/index.php?topic=462.0 [nonactive]

Warning: fsockopen, pfsockopen, show_source, php_uname, ini_get, ini_alter, ini_restore, ini_set, getrusage, mysql_list_dbs, get_current_user, set_time_limit, getmyuid, getmypid, dl, leak, listen, chown, chmod, chgrp, realpath, tmpfile, link, mb_send_mail() has been disabled for security reasons in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1412
Warning: fwrite(): supplied argument is not a valid stream resource in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1418
Warning: fgets(): supplied argument is not a valid stream resource in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1420
Warning: fclose(): supplied argument is not a valid stream resource in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1421
Warning: getimagesize(): URL file-access is disabled in the server configuration in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1425
Warning: getimagesize(hxxp:www.otakugallery.com/yugi-oh/Avatar/Avatar_msn/19.GIF [nonactive]): failed to open stream: no suitable wrapper could be found in /data/members/free/tripod/uk/b/e/y/beybladesite/htdocs/yabbse/Sources/Subs.php on line 1425


How can I fix this problem?

Here is my Subs.php file from line 1398 to 1430:

// Get the size of a specified image with better error handling.
function url_image_size($url)
{
// Get the host to pester...
preg_match('~^\w+://(.+?)/(.*)$~', $url, $match);

// Can't figure it out, just try the image size.
if ($url == '' || $url == 'http://' || $url == 'https://')
return false;
elseif (!isset($match[1]))
return @getimagesize($url);

// Try to connect to the server...
$temp = 0;
$fp = @fsockopen($match[1], 80, $temp, $temp, 1);

// Successful?  Continue...
if ($fp !== false)
{
// Send the HEAD request.
fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n\r\n");
// Read in the HTTP/1.1 or whatever.
$test = substr(fgets($fp, 11), -1);
fclose($fp);

// See if it returned a 404/403 or something.
if ($test != '4')
return @getimagesize($url);
}

// Didn't work.
return false;
}

[Unknown]

Do you have image size limiting on?

-[Unknown]

Tomer

Well whatever you did it worked cause I dont see the errors, good job. :)

Advertisement: