Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-19-2001, 05:54 AM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been working in php for quite some time now, but I admit that I'm a little new to some of the more advanced regular expressions, like vB uses.

Is there any way to have the vB bbcode parser turn this:
Code:
[IMG align="left"]http://image.com/image.gif[/IMG]
into this:
Code:
<img align="left" src="http://image.com/image.gif">
I'm sure there is -- I regret that I don't yet have the skills to make sense of the 30+ character strings vB uses in preg_replace.

Thanks!
Reply With Quote
  #2  
Old 11-19-2001, 06:03 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just add it as a custom vB code, from the Admin CP.
You'll see an option to use a {param}.
Only you won't be able to do this:
[img align="left"]
but rather this:
[img=left]

[QUOTE]Originally posted by bigmattyh
I'm sure there is -- I regret that I don't yet have the skills to make sense of the 30+ character strings vB uses in preg_replace.
Reply With Quote
  #3  
Old 12-18-2001, 10:39 PM
yulee yulee is offline
 
Join Date: Dec 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, I'm trying it but without success

Check please what I'm doing wrong:

Code:
vB code tag: img align
vB code replacement: <p><img src={param} align="{option}"></p>
vB code example: 
use options: yes.
I'm receiving this in hte definitons:

Code:
 is replaced with  ()
It seems it's not changing [ for <

I have vBulletin 2.2.1. Aggh What I'm doing wrong!

Thank you very much
Reply With Quote
  #4  
Old 12-18-2001, 11:15 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You named the new BBCode img ... where one already exists.
Rename it something else, like img align as shown in Firefly's example above.

Alternately, you could just add the align code and memers can just use that....

[align=center][img]www.shinraonline.com [/img ][ /align]
Reply With Quote
  #5  
Old 12-18-2001, 11:23 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be:

vb code tag img
vb code replacement <img src="{param}" align="{option}">

vb code example [img=right]http://www.mysite.com/logo.gif[/img]

Hope that helps.

Amy
Reply With Quote
  #6  
Old 12-18-2001, 11:25 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine is working even with using the img tag, but a new tag is probably best as they suggested.

Amy
Reply With Quote
  #7  
Old 12-18-2001, 11:36 PM
yulee yulee is offline
 
Join Date: Dec 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No success:

vB Code tag: imgalign
vB Code replacement: <img src="{param}" align="{option}">
vB Code example:
Use option: Yes.

I think I'm doing what you mean, but it's not running. No hack done in my forum yet.
Reply With Quote
  #8  
Old 12-18-2001, 11:40 PM
yulee yulee is offline
 
Join Date: Dec 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Reeve of shinra
You named the new BBCode img ... where one already exists.
Rename it something else, like img align as shown in Firefly's example above.

Alternately, you could just add the align code and memers can just use that....

[align=center][img]www.shinraonline.com [/img ][ /align]
If you do that you don't receive a real align left. I need to have the real img align.

Please, I know it sould be very easy, but I can't manage it.

Thank you very much!
Reply With Quote
  #9  
Old 12-19-2001, 04:40 PM
yulee yulee is offline
 
Join Date: Dec 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Should I use any replacement or only add the vbcode? I can't manage it

Please, help me to have success with img align
Reply With Quote
  #10  
Old 12-19-2001, 09:21 PM
yulee yulee is offline
 
Join Date: Dec 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea?

Thank you!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:01 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.05684 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete