PDA


View Full Version : Upload image with link


Pages : [1] 2

Lionel
01-17-2007, 03:22 AM
This will allow you to upload an image with your link

Sorry guys, instructions are a little messy, I am in a hurry. I have this installed for a while now and I just wanted to share.


Alter table_prefix adv_links (use phpadmin to add those 2 new columns)

`imagedata` mediumblob NOT NULL,
`imagetype` varchar(100) NOT NULL default '',

In addlink.php find (set your max_height and max_width)

$link['linkurl'] = htmlspecialchars($link['linkurl']);
$link['catid'] = intval($link['catid']);
$link['keywords'] = clean_keywords($link['keywords']);

$errors = check_link_errors($link);

add after


$max_height = 500;
$max_width = 200;
if (is_uploaded_file($_FILES['linkimage']['tmp_name']))
{
$imagetype = trim(substr(strrchr(strtolower($_FILES['linkimage']['name']), '.'), 1));
if ($imagetype == "jpeg" OR $imagetype == "jpg" OR $imagetype == "png")
{
// Get new sizes
list($width, $height) = getimagesize($_FILES['linkimage']['tmp_name']);
$new_width = $width;
$new_height = $height;
if ($height > $max_height) {
$new_width = ($max_height / $height) * $width;
$new_height = $max_height;
}
if ($width > $max_width) {
$new_height = ($max_width / $width) * $height;
$new_width = $max_width;
}
$imagedata = imagecreatetruecolor($new_width, $new_height);
}
if ($imagetype == 'jpeg' OR $imagetype == 'jpg')
{
$source = imagecreatefromjpeg($_FILES['linkimage']['tmp_name']);
imagecopyresampled($imagedata, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
ob_start();
imagejpeg($imagedata);
$imagedata = ob_get_contents();
ob_end_clean();
}
elseif ($imagetype == 'gif')
{
$imagedata = file_get_contents($_FILES['linkimage']['tmp_name']);
}
elseif ($imagetype == 'png')
{
$source = imagecreatefrompng($_FILES['linkimage']['tmp_name']);
imagecopyresampled($imagedata, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
ob_start();
imagepng($imagedata);
$imagedata = ob_get_contents();
ob_end_clean();
}
else
{
$imagedata = "";
$imagetype = "";
}
if (!empty($imagedata) AND !empty($imagetype))
{
$imagesql = ", imagedata = '" . addslashes($imagedata) . "', imagetype = '$imagetype'";
}
}
else
{
$imagedata = "";
$imagetype = "";
$imagesql = "";
}


find $newlink['description'] = htmlspecialchars($newlink['description']);
$newlink['linkurl'] = htmlspecialchars(trim($newlink['linkurl']));
$newlink['keywords'] = clean_keywords($newlink['keywords']);
$newlink['catid'] = intval($newlink['catid']);
$errors = check_link_errors($newlink);

add

$max_height = 500;
$max_width = 200;
if (is_uploaded_file($_FILES['linkimage']['tmp_name']))
{
$imagetype = trim(substr(strrchr(strtolower($_FILES['linkimage']['name']), '.'), 1));
if ($imagetype == "jpeg" OR $imagetype == "jpg" OR $imagetype == "png")
{
// Get new sizes
list($width, $height) = getimagesize($_FILES['linkimage']['tmp_name']);
$new_width = $width;
$new_height = $height;
if ($height > $max_height) {
$new_width = ($max_height / $height) * $width;
$new_height = $max_height;
}
if ($width > $max_width) {
$new_height = ($max_width / $width) * $height;
$new_width = $max_width;
}
$imagedata = imagecreatetruecolor($new_width, $new_height);
}
if ($imagetype == 'jpeg' OR $imagetype == 'jpg')
{
$source = imagecreatefromjpeg($_FILES['linkimage']['tmp_name']);
imagecopyresampled($imagedata, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
ob_start();
imagejpeg($imagedata);
$imagedata = ob_get_contents();
ob_end_clean();
}
elseif ($imagetype == 'gif')
{
$imagedata = file_get_contents($_FILES['linkimage']['tmp_name']);
}
elseif ($imagetype == 'png')
{
$source = imagecreatefrompng($_FILES['linkimage']['tmp_name']);
imagecopyresampled($imagedata, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
ob_start();
imagepng($imagedata);
$imagedata = ob_get_contents();
ob_end_clean();
}
else
{
$imagedata = "";
$imagetype = "";
}
if (!empty($imagedata) AND !empty($imagetype))
{
$imagesql = ", imagedata = '" . addslashes($imagedata) . "', imagetype = '$imagetype'";
}
}
else
{
$imagedata = "";
$imagetype = "";
$imagesql = "";
}


still in addlink.php locate the below and do the changes in red


$db->query_write("
INSERT INTO " . TABLE_PREFIX . "adv_links
(catid, name, linkurl, description, keywords, linkrecipurl, valid, open, username, userid, dateline, ipaddress, imagedata, imagetype)
VALUES (
$link[catid],
'" . $db->escape_string($link['name']) . "',
'" . $db->escape_string($link['linkurl']) . "',
'" . $db->escape_string($link['description']) . "',
'" . $db->escape_string($link['keywords']) . "',
'" . $db->escape_string($link['linkrecipurl']) . "',
$valid,
1,
'" . $db->escape_string($vbulletin->userinfo['username']) . "',
" . $vbulletin->userinfo['userid'] . ",
" . TIMENOW . ",
'" . $db->escape_string(IPADDRESS) . "',
'" . addslashes($imagedata) . "', '$imagetype'
)");


[$db->query_write("
UPDATE " . TABLE_PREFIX . "adv_links SET
catid = $newlink[catid],
name = '" . $db->escape_string($newlink['name']) . "',
linkurl = '" . $db->escape_string($newlink['linkurl']) . "',
linkrecipurl = '" . $db->escape_string($newlink['linkrecipurl']) . "',
description = '" . $db->escape_string($newlink['description']) . "',
keywords = '" . $db->escape_string($newlink['keywords']) . "',
lastupdated = " . TIMENOW . ",
notes = '" . $db->escape_string($newlink['notes']) . "' $imagesql
WHERE linkid = $linkid
");

###################################################
in showlink.php after

if (empty($_REQUEST['do']))
{
$_REQUEST['do'] = 'showlink';
}
put


// ############################### Get Image ###############################
if ($_REQUEST['do'] == 'getimage')
{
$linkid = iif(is_numeric($_GET['linkid']), $_GET['linkid'], 0);
$imageinfo = $db->query_first("
SELECT imagedata, imagetype
FROM " . TABLE_PREFIX . "adv_links
WHERE linkid = '$linkid'
");
if ($linkid)
{
header('Cache-control: max-age=31536000');
header('Expires: ' . gmdate('D, d M Y H:i:s', (TIMENOW + 31536000)) . ' GMT');
header('Content-disposition: inline; filename=image.jpg');
header('Content-transfer-encoding: binary');
header('Content-Length: ' . strlen($imageinfo['imagedata']));
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', (TIMENOW)) . ' GMT');
$extension = $imageinfo['imagetype'];
if ($extension == 'jpg' OR $extension == 'jpeg')
{
header('Content-type: image/jpeg');
}
else if ($extension == 'png')
{
header('Content-type: image/png');
}
else
{
header('Content-type: image/gif');
}

print $imageinfo['imagedata'];
}
die();
}

#########################################

templates changes

ADV_LINKS_ADD_EDIT change the form action to
<form enctype="multipart/form-data" action="addlink.php" method="post">

after the $customfieldbits, put in the upload form

<fieldset class="fieldset"><legend>Link Image</legend>
<div style="padding:$stylevar[formspacer]px">
Upload an image (or change current one)<br />jpg or png will be resized to 300 pixels width if larger.<br />Gif images <b>must</b> be 300 px wide or under or image will be deleted.<br />
<input class="bginput" name="linkimage" size="40" type="file" />
</div>
</fieldset>
in ADV_LINKS_SHOWLINK (now use your imagination where you want image to display. My template has been reworked completely, so you have to figure it out, it's just plain HTML
<if condition="!empty($link[imagedata])">
<img style="padding: 0px" src="showlink.php?$session[sessionurl]do=getimage&linkid=$link[linkid]" />
</if>

aacircle
01-19-2007, 05:47 AM
Very cool. Would be great if such cool features were part of the default.

neverstop
01-24-2007, 08:49 PM
This works great.

I do have a concern regarding storing the images in the db. I am planning on having thousands of links in the directory, all with a picture. I have a feeling it will cause my db to become massive once we have added the links. Is this a legitimate concern?

Cheers and thanks for the mod,
Ian

Lionel
01-24-2007, 08:58 PM
should not be a problem. I have thousands of images stored in my gallery db.

frosch68
02-08-2007, 09:56 AM
hello, sorry for my bad english

i have made the changes but i get this error 1136:


Datenbankfehler in vBulletin 3.6.4:

Invalid SQL:

INSERT INTO vb3_adv_links
(catid, name, linkurl, description, keywords, linkrecipurl, valid, open, username, userid, dateline, ipaddress)
VALUES (
4,
'Hallo Gemeinschaft',
'http://www.xxx.info',
'test',
'',
'',
1,
1,
'Flckchen',
87,
1170942892,
xxx
'\0JFIF\0\0\0\0\0\0\0>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
\0C\0

$.\' \",#(7),01444\'9=82<.342\0C

2!!22222222222222222222222222222222222222222222222222\0\0K\0d\"\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0}\0!1AQa\"q2‘#BR$3br‚
%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š \0\0\0\0\0\0\0\0
\0\0\0w\0!1AQaq\"2B‘ #3Rbr
$4%&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š \0\0\0?\0Kq*ii%’wc’Pd“kKubx]’\0\0W>6›]<?f–*†7$*B#Gid\0\0t#Iu™>.†KY|‘…Y/-œ€Z!‰h$w>MštDŽ/1qBxrbG ud#F[V+=kh•Y_Pœ2\0žMZ=Œ˲…R`Tœ2Gjm!››\\UŽȹžk›ˆ
rg‘$Fn`I`…€Y i›W[-X••U,㳸€ u=*d#F”0Gl‘Iw2\'’‘c 3X2F6–Ÿ—5NǵK[…]Il`H¢—D(m‹1.’Fuk{–f–)$‰L\"UݸsZݽ*.œ‰(™-f`6rr6œJҲ*6TQZ\' Ž{\0\0^P\0賮|
&^]ܤ`=ŠŠ UŸ\0‘\0^q\"6˧h6!–.fgi|’1%ˆ0̽˜u[xu+O-m‘™y[v7st—‹žt\"cvpqž׾:M! p$Šyp0UP6*Zs{1$k-zX2<pn›“†P2Vg’?……n<Z–la\"“G‘䏨>u…R!\\F\"e(RD9-ƒT46Zš5›E’Pp)FŒ ’۲€x›:}G=u†-.b6O `3l;\\ŽCjH&mt*F —wk8IhD #‚|oO<–i*ݤ–XP;pS‚
Z>_ˣ‚;ss\\<OP(E•\'x,qJ]F]U– ŸL㵽A<ltB9JԏȨ+Pjy3#%M^L’‚<\0\\ž“Me4{H’Km>
i=ķr8P‡95Šuv,‡o•›1m$eqSji-?Zy[*XK˜n!yE%FR]Xg<\0š]
Oէԯ(–+`y*…~uϿ5<‡9=^‰OŠŠEZ_+פ_*m‡\0ŠWJ\0X\0*2c}de5’*A5`Ž„z9S #™U[UŽ5‘mհV2w\0}sM_ k V25c*‘™˜Arœ%W9<TrxkE–W
Z†Fcm…y<ŒuBnxŒ);zqƒšz̬”+‚9‹˸xcF7 o+L+I%̮“f9#qO֏r\\jžW•\'‘—\0?*A\02>ee-% plˆŽ(V\0‹4Šœ
‡\0|տ]7ŸnBŒ7_n=™G™G3\"722KfPZ`SElxa\0—\0?*}ƒ‡\0Š_K\0tUgWž&Ki†q”€ ž™\'{(
].ƒ_)‡2^-h…pdgP8*;tžLci,W—ŒlSFDP `V
ž(G7Œn3m!\"A#HUB@|ŒdntMr}3H’,*—*OH)Ža•_- ֲͩE:uœfeYSœ *6…X“_]5wŠ}šwx™ŽH~M’Qœ’YnᴹX.‚}۷gڏy*€]7wRq&n*2[ݻQX![ž=;r]\0ᷲ滦Xov{ky۷
[-ҡ›XK)m<=,(sš2m‘‚ œtGŠ$–A‰;W O@+–KwMN5’z›˜UUII`yv\"[A(]•’Fv?VbIMqImi-\0_1—‘›
yn9#D7†6tB3AMR2Ži8oi%šRKwˆ%i$iN RC&:žk}f[Œشlۏoa4Va‡†)}3VѴRn
0H=A˴oRŠ0p8V!տ\0‘6•OfX›v\0+wL3O}/N”bM>~hӁš!տ\0‘C\0#(Œgz^™%œvri֏kܐ*QO<…•[‘M’$
028$W\0 *\0?\0|[G`u<kjN,“’e€\'ˆ@[~?$?޹Œu_Huo…\0\0
nGzt!KHcVq… ‚:“ƒT,<+Ilw˜a00B2{#\0 *\0?\0|[BAŽ\"(TR#n6\0„‡V\0Ÿ\0GQ\0 *\0?\0|}MxgS–Ig.dVZ', 'jpg'

);

MySQL-Fehler : Column count doesn't match value count at row 1
Fehler-Nr. : 1136
Datum : Thursday, February 8th 2007 @ 02:54:52 PM
Skript : http://www.xxx.info/links/addlink.php
Referrer : http://www.xxx.info/links/addlink.php
IP-Adresse : xxx
Benutzername : Flckchen
Klassenname : vb_database


whrer is the problem ? i thoink in imagetype but i dont know it

can you help me please ??

Lionel
02-11-2007, 07:00 PM
I use GD. Did you alter your database?
Alter table_prefix adv_links (use phpadmin to add those 2 new columns)

`imagedata` mediumblob NOT NULL,
`imagetype` varchar(100) NOT NULL default '',

frosch68
02-14-2007, 12:02 PM
yes i have..... i have found the problem, it was a "," in the addlink.php

sorry.....

jim6763nva
02-18-2007, 11:18 AM
yes i have..... i have found the problem, it was a "," in the addlink.php

sorry.....

Where did you find the error? What line? I'm getting a very similar database error.


I dont understand the "default" part for image type either. What value should I put? There is a note in phpmyadmin when using defaults to use the format: a

Can someone tell me what this means please?

Thanks,
Jim

jim6763nva
02-18-2007, 11:30 AM
Nevermind... LOL I found the problem. For some reason, the comma after the IPADDRESS field got removed or was not added in the query.

It's working now. :)

Jim

blastup
03-01-2007, 11:30 PM
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/.mannaz/blastup/indexspot.com/reviews/addlink.php on line 458

i got this problem and i installed it on the newest version of links directory?
help?thanx

Lionel
03-02-2007, 12:20 AM
you need to follow instructions to the letter. I just reinstalled it for 2.01, using the instructions I posted here because I overwrote my files. If you do you won't have any errors.

Make sure you don't miss a comma. I just made the changes bigger.

Andy R
03-03-2007, 09:26 PM
HINT: This would be a great feature for Brian to add to the next version of vBa Links Directory.

blastup
03-04-2007, 05:15 PM
you need to follow instructions to the letter. I just reinstalled it for 2.01, using the instructions I posted here because I overwrote my files. If you do you won't have any errors.

Make sure you don't miss a comma. I just made the changes bigger.
ok i will reinstall it.. thanx..

Lionel
03-04-2007, 05:42 PM
HINT: This would be a great feature for Brian to add to the next version of vBa Links Directory.

I too would love to see this added so I don't have to edit after each upgrade. I am even planning to further improve on this by charging for uploading, and display first, in bold, those who paid.

blastup
03-04-2007, 06:56 PM
thanks this hack is great.. it works now..

blastup
03-04-2007, 08:24 PM
you need to follow instructions to the letter. I just reinstalled it for 2.01, using the instructions I posted here because I overwrote my files. If you do you won't have any errors.

Make sure you don't miss a comma. I just made the changes bigger.

yea i put it in the wrong database.. that is why.. um... is there a way to show it in the browselinks.php section and newest links section and random links.. so you will see a list of links with images.. I been trying to do this..and trying to put the image next to the statusicons .. but for some reason it don;t work.. and only works in showlinks.php.. i can;t get it.. could you help thanx...

blastup
03-04-2007, 08:25 PM
you are da bomb man for giving people this script..

blastup
03-04-2007, 08:31 PM
also is there a way to put the browse button.. on the administor panel..
under vBa Links Directory> Add links.. I also tried to do this.. but i am such an amateur. i just started like vbulletin this week.. and not really familiar with the codings..

Lionel
03-04-2007, 08:37 PM
yea i put it in the wrong database.. that is why.. um... is there a way to show it in the browselinks.php section and newest links section and random links.. so you will see a list of links with images.. I been trying to do this..and trying to put the image next to the statusicons .. but for some reason it don;t work.. and only works in showlinks.php.. i can;t get it.. could you help thanx...

sure you could show it in any of the adv_links_linkbit display, it's in the database. You just need to get the image also when you get the other info, and then add it to the template..... but you have to make sure those images are not big.

blastup
03-04-2007, 09:38 PM
do i need to edit anything in the browselinks.php for it to show the list of images? or just the xml template? or both?

Lionel
03-04-2007, 10:16 PM
There is a nice hack in the forums that will put a screenshot of website as a thumb for you. Do a search for thumbshots.

If it is the uploaded image that you want, then in browselinks.php locate

// Get Links
and add after links.catid,
links.imagedata, (with the comma) after

then in your adv_links_linkbit

<img style="padding: 0px" src="showlink.php?$session[sessionurl]do=getimage&linkid=$link[linkid]" />

where you want it to display. It will display everywhere that link is called.

If I were you, I would further improve it by resizing image in the same browselinks.php in the while loop, and if there are no image, display a generic image for consisitency. Remember image is stored in database, so you would need to fake printing it first so you could use the GD image resize functions. Otherwise the uploaded image must be very small or that will throw off your layout.

I am about to post another neat modification. If you can be a couple of days patient, I'll do the resizing for you.

blastup
03-05-2007, 01:23 AM
omg thank you you are my savor.. cool another mod .. thanks . do you think you can add a fix to deleting images.. because all the images uploaded. can't be deleted.. you will have to delete a whole thread.. Plus the Administrator Panel Dosen;t have the upload feature.. i think those features you should add on to for your next mod..

Lionel
03-05-2007, 01:26 AM
Yeah you are right. I will add that.

here (http://www.vbadvanced.com/forum/showthread.php?p=107010#post107010) is another mod for you

blastup
03-05-2007, 01:41 AM
cool thanx.. tell me when you updated your mod..

Lionel
03-05-2007, 01:49 AM
to delete existing image

in template ADV_LINKS_ADD_EDIT

put this where you have the upload input right before

</div>
</fieldset>

<if condition="$show['editlink']"><div>
<input type="checkbox" name="deleteimage" value="1">&nbsp; Check this box to delete current image.
</div>
</if>

in addlinks.php

in the routine: // ##### Do Edit Link
put

$deleteimage=$vbulletin->input->clean_gpc('p', 'deleteimage', TYPE_UINT);

below (it's at the beginning of routine)
$newlink = $vbulletin->input->clean_gpc('p', 'link', TYPE_ARRAY);

still in the same routine, locate
if (!empty($imagedata) AND !empty($imagetype))
{
$imagesql = ", imagedata = '" . addslashes($imagedata) . "', imagetype = '$imagetype'";
}
}

and add below it

else if(isset($deleteimage))
{
$imagedata = "";
$imagetype = "";
$imagesql = ", imagedata = '', imagetype = ''";
}

now, you can delete existing image

blastup
03-05-2007, 02:45 AM
wow man you got some skills man works perfectly.. Thanx Again

blastup
03-05-2007, 02:50 AM
but it got some bugs though.. it could delete the image.. but when i upload another image up.. a different image.. it went back .. to the original one.. try it out your self

Lionel
03-05-2007, 05:14 AM
not for me. The image is stored in database. Once you delete it in there, it can never comeback

Lionel
03-05-2007, 06:25 AM
if you want the current image to display when you are editing the link, add this in your ADV_LINKS_ADD_EDIT somewhere above the upload in put. I put mine right below

<div style="padding:$stylevar[formspacer]px">

<if condition="$link[imagedata]!=''">
<img src="showlink.php?do=getimage&linkid=$link[linkid]">
</if>
<br />

Your other problem comes from the cache. refresh browser and it will disappear.

P.S. I also moved up the delete condition below the image display. No need to show it if there are no image :-)

Lionel
03-05-2007, 06:44 AM
next, i am going to make the guys who pay rotate their banner in the listings in same category with no banner, LOL

blastup
03-05-2007, 05:46 PM
oh it is cache .... my bad.. thanx

blastup
03-07-2007, 07:07 PM
should not be a problem. I have thousands of images stored in my gallery db.
hey is there anywayz for this? http://www.vbadvanced.com/forum/showthread.php?t=20778

blastup
03-15-2007, 12:13 AM
hey i want to put a screen shot of the link also.. how would you change the codes? i tried thumbshots.. but they are too small..and quality is really bad.. can you help thanx.

calord
04-06-2007, 02:04 PM
I want to install this but I didn't understand the very first part, about adding tables in Phpadmin.

Exactly what tables am I adding? I see the adv_links table, but I don't see a table_prefix table. Yes, I'm a little slow with coding.

Also, all my tables are prefixed with vbb_ so I am seeing vbb_adv_links. I am not sure if I am waaay off or what. Please help.

rknight111
05-31-2007, 03:03 AM
Alter table_prefix adv_links (use phpadmin to add those 2 new columns)

`imagedata` mediumblob NOT NULL,
`imagetype` varchar(100) NOT NULL default '',


Where is this located??

I have done everything else but this

Thanks,
RON

Lionel
05-31-2007, 03:07 AM
Where is this located??

I have done everything else but this

Thanks,
RON

(use phpadmin to add those 2 new columns)

rknight111
05-31-2007, 09:14 AM
What program do I add these tables Alter table_prefix adv_links
Im not sure where I can find these, could you let me know where to find these. Every thing else is done

Lionel
05-31-2007, 01:41 PM
use phpadmin to add those 2 new columns
if you don't know what this is, don't mess up with your forums and uninstall this hack. Misusing it can hurt you big time

rknight111
05-31-2007, 07:35 PM
Sorry, Im not a computer programmer, I will find someone to add this part to my links. Thanks, I wouldnt want to toast by board. This hack is very good though. I have added all the other coding allready and will not open my links page untill I can finish this part.

RON

rknight111
06-02-2007, 12:56 AM
I got some help from a coder on vbulletin, Nice Mod.

Now Im just playing around with the ADV_LINKS_SHOWLINK where is the best place to put that coding that works the best. Any help would be great. He left that to me. Im just moving around and mabie I'll find a good spot but Im sure you have all done this allready.

Thanks
RON

rknight111
06-05-2007, 09:31 AM
What directory are the file images stored to?

Thanks,
RON

Lionel
06-05-2007, 12:13 PM
They are stored in database

rknight111
06-05-2007, 12:22 PM
I made my size 250H x 400W in both so I wont have any problems in the future with anything I hope being all in the data base.

RON

airliner
11-13-2007, 10:14 AM
That works with Showlink.php

Can it be done with browselink.php top show image there as well?
And if so, how?
I was looking for some plays to put those lines in:

<if condition="!empty($link[imagedata])">
<img style="padding: 0px" src="showlink.php?$session[sessionurl]do=getimage&linkid=$link[linkid]" />
</if>

Is those lines correct and where can I put those in?
I want them next to description.
thanx for a greate mod!!

Cheers

Lee G
11-15-2007, 11:33 AM
Can anyone give some insight in how to do the following

Alter table_prefix adv_links (use phpadmin to add those 2 new columns)

`imagedata` mediumblob NOT NULL,
`imagetype` varchar(100) NOT NULL default

And should the above read Alter table_prefix in adv_links

Im willing to give it a go, once I know where to look and how to alter it

After all, its a good incentive for other web sites to exchange links

And if you worried about people messing things up, pm me the info

Thanks for any help
Lee G

Lee G
11-15-2007, 05:54 PM
This is bugging me. I'm still looking and cant find where or how to do this with phpMyAdmin

Lionel
11-15-2007, 07:02 PM
Sorry... I will not help with database. If you don't know those basic steps stay away from this or it could mean disaster for you.

Lee G
11-16-2007, 09:35 AM
All sorted and working first time. I asked on vBulletin.org about the data base edits and got the right pointers as to how and what to do

airliner
11-16-2007, 09:42 AM
This is bugging me. I'm still looking and cant find where or how to do this with phpMyAdmin

In phpMyAdmin,

1. Select required database in the left drop-down menu.
2. Choose the table to be modified. (Scroll down to it and click on the icon "Structure").
3. Scroll down until you will come to a textarea with title "Run SQL query/queries on database yourdatabasename".
4. Erase the first line
5. Add columns with ALTER table commands above.
6. Done

MelH
11-23-2007, 11:59 PM
Thanks for a great hack, I've installed it and everything is working except the images are not being resized made smaller. They stay the original size.

I've checked everything but I must have done something wrong. Can you tell me what that might be? Thanks