PDA

View Full Version : Image Links


Sploodge
03-15-2007, 04:51 PM
Is it possible to add an image links section to the bottom of the vbpicgallery.php file..

Basically its the same feature used on imageshack to let you embed an image..

Like this ( but only the direct link option )

http://img83.imageshack.us/img83/9127/clipboard01hb7.jpg

It would be a cracking way for members to post thei images in a thread..

Sploodge
03-19-2007, 02:57 AM
Having not recieved a reply ( not moaning at all ), I decided to give it a bash myself as I believe this would be a cool mod...

This is what ive done.

I have managed to get the box with the URL of the image to appear by adding the following code into the vbpicgallery_popup template..


<tr>
<td class="alt1" width="50***37;" align="right" ><div class="smallfont">Image Code:</div></td>
<td class="alt2" width="50%" align="left"><div class="smallfont"><textarea cols="50" onmouseover="this.select()">http://www.mysite.com/vbpgimage.php?do=full&p=$id</textarea></div></td>
</tr>


This selects the code when I put the mouse over it...

http://img443.imageshack.us/img443/7218/vbpiceb5.jpg (http://www.imageshack.us)

Now I need to have [IMG] tag around the URL.. But when I add it to the code above and try and save the template I get this:


The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\xampp\htdocs\includes\adminfunctions_templat e.php(3596) : eval()'d code on line 55

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


I take it VB or Mysql does not like having the IMG tag in there for some reason...

Anyone with a way around this?

Greg
03-19-2007, 05:56 AM
I think you have to use special chars to show the brackets. I started coding this and it's on the gallery here. But not complete and there is no release date for an update scheduled at this time.

Sploodge
03-19-2007, 06:04 AM
Can you tell me/us how you hot the IMG tag to work in the template?:) Or is the problem that I am using a form and not an imput for the code?

Also think it looks tidier were I have got it tbh...

Thanks for the reply..

Regards,

Andy

Sploodge
03-19-2007, 06:21 AM
Never mind... Cheers for pointing me in the right direction Noppid :)

This is the code I am now using and get the IMG tag in there too..

This is what ive done.

I have managed to get the box with the URL of the image to appear by adding the following code into the vbpicgallery_popup template..


<tr>
<td class="alt1" width="50%" align="right" ><div class="smallfont">Image Code:</div></td>
<td class="alt2" width="50%" align="left"><div class="smallfont"><textarea cols="50" onmouseover="this.select()">http://www.mysite.com/vbpgimage.php?do=full&p=$id</textarea></div></td>
</tr>


This selects the code when I put the mouse over it...

http://img443.imageshack.us/img443/7218/vbpiceb5.jpg (http://www.imageshack.us)

Greg
03-19-2007, 06:38 AM
In vbpicgallery_popup template find.


<img src="$vboptions[bburl]/vbpgimage.php?do=full&amp;p=$id&amp;d=$result_data[u_date]" border="0" alt="$result_data[name]" />


After add.


<br /><br />
<div style="color:#FFFFFF">
<form name="urlform">
BBCode for Posts: <input type="text" value="<if condition="1">$id</if>" name="vbgp-bbcode" onkeydown="blur()" onfocus="this.select()" style="color:#666666" /><br />
IMG Code for Posts: <input type="text" value="$vboptions[bburl]/vbpgimage.php?do=full&amp;p=$id&amp;d=<if condition="1">$result_data[u_date]</if>" name="vbgp-bbcode" onkeydown="blur()" onfocus="this.select()" style="color:#666666" />
</form>
</div>


That's what I'm currently running here for testing.

yakabod
04-04-2007, 09:37 PM
In vbpicgallery_popup template find.


<img src="$vboptions[bburl]/vbpgimage.php?do=full&amp;p=$id&amp;d=$result_data[u_date]" border="0" alt="$result_data[name]" />


After add.


<br /><br />
<div style="color:#FFFFFF">
<form name="urlform">
BBCode for Posts: <input type="text" value="<if condition="1">$id</if>" name="vbgp-bbcode" onkeydown="blur()" onfocus="this.select()" style="color:#666666" /><br />
IMG Code for Posts: <input type="text" value="$vboptions[bburl]/vbpgimage.php?do=full&amp;p=$id&amp;d=<if condition="1">$result_data[u_date]</if>" name="vbgp-bbcode" onkeydown="blur()" onfocus="this.select()" style="color:#666666" />
</form>
</div>


That's what I'm currently running here for testing.

Is this code safe to use?

Greg
04-05-2007, 09:57 AM
I see no reason it would be a problem. It's basically the same code found on all image hosting sites.