Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2013, 07:18 PM
AzzazelCyC AzzazelCyC is offline
 
Join Date: Apr 2013
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Getting some BBCode to properly work

Hello again everyone,

This -I know for a fact- is a quite simple question, yet I'm not sure why I haven't been able to get it to properly work. It is about some BBCodes I am trying to implement but haven't been able to do so successfully.

The first one would be for tables; currently it is way too complex to create a table, I've tried to simplify it, yet it didn't properly work; what I want is for this to be as easy as just put up [table] [ /table] and separate data by using the "|" symbol, with the variable of a head, by using [table=head] [/ table]; would anyone be able to let me know the exact code I'd need to paste in order to get this to properly work? I've done the common HTML code for it but when I create a table, instead of add the data the user types, it puts what I posted in the "Example"....

Second one would be a "pack" of codes, which are to make images be posted to the right or left of text, but the common align (HTML) didn't work for me....and I want to use it as [IMGLEFT/RIGHT] [/ IMG].

Any help with these codes would be highly appreciated!
Reply With Quote
  #2  
Old 04-25-2013, 07:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are already [TABLE] and [TR] and [TD] tags in vB4. If you add another, you will mess things up.
Reply With Quote
  #3  
Old 04-25-2013, 08:16 PM
AzzazelCyC AzzazelCyC is offline
 
Join Date: Apr 2013
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is exactly what I don't want the need to; on other vb boards I can create a table by simply using

[table ] data1 | data2
data1.1 | data 2.2 [ /table]

or

[table=head ] title1 | title2
data1 | data2 [ / table]

without the use of [TR/TD] as this makes it more complicated
Reply With Quote
  #4  
Old 04-25-2013, 08:36 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you talking about creating a shorthand notation using a BBCODE in creating a new table? Sorry, I am having a hard time understanding your question, but I am trying to
Reply With Quote
  #5  
Old 04-25-2013, 09:07 PM
AzzazelCyC AzzazelCyC is offline
 
Join Date: Apr 2013
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be the idea, eliminate the way in which you currently have to use [TR][TD] so that users won't need to, and they can create a table simply by adding the symbol "|" to separate data; as well as the use of the [table=head] which would make the first line of the table be marked as a "header" for the table
Reply With Quote
  #6  
Old 04-25-2013, 09:40 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Post what you have and see the private message I sent you.
Reply With Quote
  #7  
Old 04-25-2013, 11:17 PM
AzzazelCyC AzzazelCyC is offline
 
Join Date: Apr 2013
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, currently, what I've done is go to the AdminCP under Custom BB Codes, and add a new one, which shows as follows:

Name: Table
BB Code: [table]row 1, cell 1 | row 1, cell 2[/table]
HTML:

<table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>

Replacement: basically the output of that HTML code

When a user enters something, anything into [table] tags, the output is always the same output of this specific HTML...that's my issue on this case.

Not to mention the [IMGLEFT/RIGHT] which I need to use in order to enter images that will be placed to the right or left of text, as this is highly beneficial on different news and reviews.
Reply With Quote
  #8  
Old 04-26-2013, 12:16 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I am guessing you are not seeing any output?

Make sure you have set remove tag if empty = no, or put something between the tags.

Code:
[TABLE]anything here[/TABLE]
When you are testing. Use the testing box. You will not see any output in the example box -- until you refresh the page.


One more thing:
You are using tag "TABLE" even though this is working you are better calling it something like "QTABLE" for "quicktable". So it doesn't interfer with some weird mod that parses the BBCODE's.
Reply With Quote
  #9  
Old 04-26-2013, 12:24 AM
AzzazelCyC AzzazelCyC is offline
 
Join Date: Apr 2013
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The output is there, the thing is that, whatever data gets inserted in the table isn't shown, instead it shows "row 1, cell 1", "row 1, cell 2" and so on
Reply With Quote
  #10  
Old 04-26-2013, 12:34 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay now lets make sure we are on the same page...
Where are you inserting any data? You must pass the data via {param} and {option}. Am I missing something?

For Example:
Code:
[QTABLE="{option}"]{param}[/QTABLE]
So in your case you need to pass a 'string' to your bbcode and 'carefully' parse / validate that string using PHP or JavaScript on the back end.

I will pass you some back-end code when your ready.

--------------- Added [DATE]1366942645[/DATE] at [TIME]1366942645[/TIME] ---------------

If your not familiar with what I am talking about. This is a nice little MOD that I have referred many people to by Cellarius. It is easy enough to write your own backend for bbcodes, but this is pretty useful for a structured setup.

https://vborg.vbsupport.ru/showthread.php?t=264896
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 07:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04174 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
  • (2)bbcode_code
  • (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