Previous Thread
Next Thread
Print Thread
Rate Thread
#283146 01/18/2005 2:15 PM
Joined: Dec 2004
Posts: 36
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 36
some users complain that links structured like the example below will not show the image, but the full url only.

Question: is there any way that I could make image links like this show the actual image on 6.5 ? I would be most grateful for a solution.

[image]http://chatmenude.com/plaza/gallery/wm.php?pid=5595&mode=fullsize[/im
age]

The image shows fine when called in a browser window, but not between the [image] tags.

Last edited by nosleep; 01/18/2005 2:16 PM.

nosleep
Sponsored Links
Joined: Aug 2004
Posts: 173
Member
Member
Offline
Joined: Aug 2004
Posts: 173
[image][/image]

Your closing tag is wrong. It needs to be as above

Joined: Dec 2004
Posts: 36
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 36
[img]http://chatmenude.com/plaza/gallery/wm.php?pid=5595&mode=fullsize[/img]

no, that is not the reason. See yourself.


nosleep
Joined: Aug 2004
Posts: 173
Member
Member
Offline
Joined: Aug 2004
Posts: 173
[]http://www.parentforum.org/images/eric.gif[/]

The above works


I think you have link pictures disabled. I can't remember how to change that, I will try and find out if no one else answer before me

Last edited by dparvin; 01/19/2005 3:50 AM.
Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
.php is not a image you try to display a script generated image, not the image itself.

Sponsored Links
Joined: Dec 2004
Posts: 36
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 36
yes, the link is php, and not an image. But that link displays fine in a phpbb2 forum and shows the image. There must be a way to have that working in UBB too?


nosleep
Joined: Aug 2004
Posts: 173
Member
Member
Offline
Joined: Aug 2004
Posts: 173
This is what I see when I look at the properties of that picture

Code
 The image “http://chatmenude.com/plaza/gallery/wm.php?pid=5595&mode=fullsize” cannot be displayed, because it contains errors. 


Do you have another picture?

Joined: Dec 2004
Posts: 36
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 36


nosleep
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Yeah you'll need to hack Threads for that. Here's what you do...

In ubbt.inc.php:

CHANGE THIS:

Code
    // ---------------------<br />    // Convert image markup <br />       if ($config['allowimages']) {<br />          if (!preg_match("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])(.*?)(\?|\"|')(.*?)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/",$Body)) {<br />             $Body = preg_replace("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])http([^\[]*)\.(gif|jpg|png)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/i","<img src=\"http\\2.\\3\">",$Body);<br />          }<br />       }  


TO THIS:

Code
    // ---------------------<br />    // Convert image markup <br />       if ($config['allowimages']) {<br />          if (!preg_match("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])(.*?)(\"|')(.*?)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/",$Body)) {<br />             $Body = preg_replace("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])http([^\[]*)\.(.*?)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/i","<img src=\"http\\2.\\3\">",$Body);<br />          }<br />       }  

Joined: Dec 2004
Posts: 36
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 36
absolutely wonderful Twisty, I owe you one. Works great


nosleep
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ack - be dealthy careful with that.... allowing people to link to scripts is a big security risk. That's why threads restricts it to real .gif, .jpg and .png files. This site was hacked last week as a result of something similar.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)