vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help with BBCode (https://vborg.vbsupport.ru/showthread.php?t=268184)

Dennis Kaczor 08-08-2011 07:38 PM

Help with BBCode
 
BB Code Tag Name: img

Replacement Code
<img src="{param}" alt="{option}" border="0" />

Example
http://www.image-source.com/image.jpg]

Description
Alt image tag

Use {option} Yes

New Post and click on the button and get the following


Click on the image button and place between the tags https://vborg.vbsupport.ru/

Here is what I get
https://vborg.vbsupport.ru/^[/IMG]


As you can see it shows the [IMG] before the http and at the end, so the question I have is what can I do to get around this or is there a better way to do this

I run a photography forum and found that this would benefit SEO for finding members inline images. So I'm asking for help from someone to look at this code and see where I went wrong here with this bbcode, and tell me what I need to do to make this work.

Thanking you.

Dennis

Videx 08-09-2011 12:21 AM

Are you even allowed to use one of the built-in tags like "IMG"?

Dennis Kaczor 08-09-2011 01:37 PM

Quote:

Originally Posted by Videx (Post 2231122)
Are you even allowed to use one of the built-in tags like "IMG"?

Videx first of all thanks f or getting back to me on this.

When you say the built-in tags are you talking about the image one? Or is this something else that you are talking about, sorry this part is all new to me even after all these years sorry.

Videx 08-09-2011 02:24 PM

I don't really know much about it myself. Have you checked out the manual: https://www.vbulletin.com/docs/html/ ? And of course try a title search at vb.com.

Dennis Kaczor 08-09-2011 02:46 PM

Quote:

Originally Posted by Videx (Post 2231385)
I don't really know much about it myself. Have you checked out the manual: https://www.vbulletin.com/docs/html/ ? And of course try a title search at vb.com.

Thanks for your help just the same and I have the manual and will go throught that again. I can get it to work, but need to delete the double IMG and it will do what I want, but trying to see if there is a way that I'm missing in the code that removed that or if there was another way that I don't know about.

But will continue to search for this and again thanks.

kh99 08-09-2011 02:49 PM

What is it you're trying to do exactly? By default, there's already an image button that lets you insert an image url, are you trying to make it work differently?

Dennis Kaczor 08-09-2011 03:23 PM

Quote:

Originally Posted by kh99 (Post 2231391)
What is it you're trying to do exactly? By default, there's already an image button that lets you insert an image url, are you trying to make it work differently?


What I'm trying to do here is add a bbcode that will allow an alt tag for better SEO search for the images posted by my members. From what I could find was to make a bbcode with the Alt tag and found the information for this in the first post.

What I'm after here is to have an Alt Tag to the image url that was posted.

Click on the image button and place between the tags [IMG=Hello World]^[/IMG]

Here is what I get
[IMG=Hello World]^[IMG]httx://www.image-source.com/image.jpg][/IMG]^[/IMG]

If I remove the ^[IMG] from the second line I can preview the image and see the Alt tag text Hello World.

But what I'm looking for is the proper way to get this to work without having to go into the mesage and remove those [IMG].

I think that I'm missing something in the code, or I'm going about this in the wrong way.

I know that one can edit the class_bbcode.php file and some templates to do this, but I have tried searching for the information and have come up blank thus far and decided to go this route. Any help to directing me in the right direction would be a great help.

Thanks very much

Dennis


All times are GMT. The time now is 06:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01142 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete