Форуми / Cotonti / Support / Url image

12>>>

CJ
#1 30.06.2011 15:03

ok so how can i make it so that if u Make a URLs that have an image not words

Like this

[url=http://www.twitter.com/GOM_Team][img]http://twitter-badges.s3.amazonaws.com/follow_me-b.png[/img][/url]

i want it so that when i click the IMAGE it goes to that link not the image.

pieter
#2 30.06.2011 17:14

If you use BBcodes, this will work.

I guess it doesn't because ou ask it here.
Do you have slimbox installed to display pictures?

Can you give us a link to an example?

... can we help you ...
CJ
#3 30.06.2011 17:36

i dont use slimbox and http://www.streetlegalmods.com/page.php?al=GOM-TEAM-is-on-twitter (the image that says Follow me on twitter)

 

i am using BBcode

pieter
#4 30.06.2011 18:34

I tested it, and for me it works on my site with your link.

Which cotonti version?
What plugins do you use?
Can you copy-paste the bbcode of "img" and "url" there are 2 of each? 

... can we help you ...
CJ
#5 30.06.2011 19:04

6.17

plugins

Page Auto-Validation
Banner Rocket Light      
Category Index
Chili Highlighter
Cleaner
Comments Edit    
ezslider
Forum statistics
gtrack
Indexpolls
IP search
Karma
Ldu Style Links      
LeetLogin      
MarkItUp!      
Mass-move topics in forums          
Meta Descriptions      
Minichat      
Mobile Skin redirect      
Moderators List          
Notifier          
Password recovery          
Recent comments
Recent items          
Search     search
Seditio Compatibility          
Sitemap             
Statistics          
Tags          
Recent user posts in forums       
User manager           
Recent page from the user            
Welcome PM               
Who's online

the Bbcode i used is in the first post

urlkiller
#6 30.06.2011 19:15

CJ you should consider using that ckedit plugin to handle your page layouts... and this wouldnt be a big problem...
also try pausing "ldu links plugin" and see if that maybe works

URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
pieter
#7 30.06.2011 19:54

CJ,

I ment http://www.streetlegalmods.com/admin.php?m=bbcode for the bbcodes

And like URLKiller said pause the plugin.

If it doesn't work, try to pause another one, till you got the wrong one.

... can we help you ...
urlkiller
#8 30.06.2011 20:20

autovalidation is also included in core system... you should really consider cleaning your plugins :)

URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
CJ
#9 30.06.2011 20:27

Got Rid of both thos plugins

and here

 

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
URL
\[url=((?:<a href="">http://|https://|ftp://</a>)?[^\s"':\[]+)\](.+?)\[/url\]
<a href="$1">$2</a>
 
\[url\]((?:<a href="">http://|https://|ftp://</a>)?[^\s"':]+)\[/url\]
<a href="$1">$1</a>
 
IMG
\[img=((?:<a href="">http://|https://|ftp://</a>)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\]((?:<a href="">http://|https://|ftp://</a>)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\[/img\]
<a href="$1"><img src="$2" alt="" class="resizeimage" /></a>
 
\[img\]((?:<a href="">http://|https://|ftp://</a>)?[^"\';:\?\[]+\.(?:jpg|jpeg|gif|png))\[/img\]
<a href="$1"><img src="$1" alt="" class="resizeimage" /></a>
urlkiller
#10 01.07.2011 00:37

you know what would be the easiest way for that?

just make a bbcode called [button]text[/button] and it builds <div class="button">text</div> then go to your css file and style the button there. so you wont have to mess with that regex.

URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
CJ
#11 01.07.2011 00:50

cause we usely use IMAGES as the button to link to another page from the news or from the forums

pieter
#12 01.07.2011 05:52

Below you can find mine:
Maybe try those
Change bbcode of IMG to:

\[img\]((?:http://|https://|ftp://)?[^"\';:\?\[]+\.(?:jpg|jpeg|gif|png))\[/img\]
<img src="$1" alt="" />

\[img=((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\]((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\[/img\]
<a href="$1"><img src="$2" alt="" /></a>

 

You have href in it. I guess this is the problem.

... can we help you ...

Відредаговано: pieter (01.07.2011 10:50, 14 років тому)
CJ
#13 01.07.2011 13:08

Its still showing images, when clicked, not the link..

pieter
#14 01.07.2011 18:48

Maybe one of the devs can help you.

... can we help you ...
CJ
#15 02.07.2011 12:39
Got it working !!! thanks Guys !!!

12>>>