vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom Page parsing List BB's problem (https://vborg.vbsupport.ru/showthread.php?t=287687)

extends 09-10-2012 11:23 AM

Custom Page parsing List BB's problem
 
Have a difficult time parsing List's using the vB_BbCodeParser function

PHP Code:

$parser = new vB_BbCodeParser($vbulletinfetch_tag_list());

$customPreText'[LIST][*]Testing[*]Testing List 2[*][COLOR=#ff0000][B][U]Testing Color[/U][/B][/COLOR] [/LIST]
[CENTER][B][COLOR=#333399]How to Join[/COLOR][/B][/CENTER]'
;

$customText $parser->parse($customPreText);

//...Register variables and place in template ... 

The problem is, is that everything works (bold, underline, center etc) except the List.

How do I fix this?

kh99 09-10-2012 11:40 AM

I tried this test program and it seems to work:

Code:

<?php

require './global.php';

require_once('includes/class_bbcode.php');
$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());

$customPreText= '[list][*]Testing[*]Testing List 2[*][color=#ff0000][b][u]Testing Color[/u][/b][/color][/list][center][b][color=#333399]How to Join[/color][/b][/center]';

$customText = $parser->parse($customPreText);

echo $customText;


What do you do with $customText after it's set?

extends 09-10-2012 11:43 AM

I don't understand why I'm having such troubles then :(

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

Quote:

Originally Posted by kh99 (Post 2364251)
What do you do with $customText after it's set?


I register it
PHP Code:

$templater->register('custommsg'$customText); 

then I display it in the template

PHP Code:

{vb:raw custommsg

I even tried to echo it, still does not work.

ugh. Maybe its working, but I just don't get the small bulletins that are suppose to appear.
  • <-Like these
  • <-one's
  • <-here

It formats them to drop down over one another, but no bulletins.

kh99 09-10-2012 12:03 PM

Have you looked to see what the html looks like?

extends 09-10-2012 12:08 PM

Quote:

Originally Posted by kh99 (Post 2364262)
Have you looked to see what the html looks like?

Code:

<li style="">Testing</li><li style="">Testing List 2</li><li style=""><font color="#ff0000"><b><u>Testing Color</u></b></font></li></ul><div style="text-align: center;"><b><font color="#333399">How to Join</font></b>

kh99 09-10-2012 12:13 PM

Does it have <ul>...</ul> around it?

I'm thinking it's something to do with CSS (and I'm not really a CSS person). I was playing around with FireBug (it lets you see the CSS and change it to see what happens), and I notice there's a "list-style: disc outside" that comes from the vbulletin.css template, and if I remove it I get no bullets.

Scanu 09-10-2012 12:44 PM

Yes i'm pretty sure it's a css problem, maybe you have this code somewhere?
Code:

list-style-type: none

extends 09-10-2012 02:15 PM

nvm... I'll have to wait till I go home to try somethings with the CSS

Scanu 09-10-2012 02:53 PM

Oh i just remembered that vbulletin does it by default you can try to wrap you variable (on the template with a div like this
HTML Code:

<div id="test">{vb:raw custommsg}</div>
And then add this css code
Code:

#test {
list-style-type: circle;
}


extends 09-11-2012 12:29 AM

Thing is, it's not evening indenting to the right or putting the bulletin.

I see nothing in the CSS's using firebug that has list-style-type: none. Only if I dig deep into the HTML (that I believe does not effect it) do I see that command.

I also tired Scanu's css solution to no prevail. Though all that would do is change that to a bulletin, which didn't work. Even when I tried to force it on firebug.

-------------------------------------------------------------------------

Something in the {vb:raw headinclude} is preventing me from using these bulletins. When removed it works as intended. But of course it messes up my display.


All times are GMT. The time now is 05:55 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.01136 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_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