vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Getting some BBCode to properly work (https://vborg.vbsupport.ru/showthread.php?t=297589)

AzzazelCyC 04-25-2013 07:18 PM

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!

Lynne 04-25-2013 07:55 PM

There are already [TABLE] and [TR] and [TD] tags in vB4. If you add another, you will mess things up.

AzzazelCyC 04-25-2013 08:16 PM

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

tbworld 04-25-2013 08:36 PM

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 :)

AzzazelCyC 04-25-2013 09:07 PM

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

tbworld 04-25-2013 09:40 PM

Post what you have and see the private message I sent you.

AzzazelCyC 04-25-2013 11:17 PM

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.

tbworld 04-26-2013 12:16 AM

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.

AzzazelCyC 04-26-2013 12:24 AM

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

tbworld 04-26-2013 12:34 AM

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


All times are GMT. The time now is 02:13 AM.

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.01115 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete