PDA

View Full Version : Custom Page parsing List BB's problem


extends
09-10-2012, 11:23 AM
Have a difficult time parsing List's using the vB_BbCodeParser function


$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());

$customPreText= '

Testing
Testing List 2
Testing Color


How to Join';

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

<?php

require './global.php';

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

$customPreText= ' Testing Testing List 2 Testing Color
How to Join';

$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 1347281300 at 1347281300 ---------------


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


I register it
$templater->register('custommsg', $customText);

then I display it in the template

{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
Have you looked to see what the html looks like?

<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?
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

<div id="test">{vb:raw custommsg}</div>

And then add this css 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.

Scanu
09-11-2012, 08:38 AM
#test {
list-style-type: circle !important;
}

You can try this it should overwrite vbulletin's css