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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2012, 11:23 AM
extends extends is offline
 
Join Date: Jul 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 09-10-2012, 11:40 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 09-10-2012, 11:43 AM
extends extends is offline
 
Join Date: Jul 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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

Quote:
Originally Posted by kh99 View Post
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.
Reply With Quote
  #4  
Old 09-10-2012, 12:03 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you looked to see what the html looks like?
Reply With Quote
  #5  
Old 09-10-2012, 12:08 PM
extends extends is offline
 
Join Date: Jul 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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>
Reply With Quote
  #6  
Old 09-10-2012, 12:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 09-10-2012, 12:44 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i'm pretty sure it's a css problem, maybe you have this code somewhere?
Code:
list-style-type: none
Reply With Quote
  #8  
Old 09-10-2012, 02:15 PM
extends extends is offline
 
Join Date: Jul 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nvm... I'll have to wait till I go home to try somethings with the CSS
Reply With Quote
  #9  
Old 09-10-2012, 02:53 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
  #10  
Old 09-11-2012, 12:29 AM
extends extends is offline
 
Join Date: Jul 2012
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 09:52 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.08623 seconds
  • Memory Usage 2,262KB
  • 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_html
  • (3)bbcode_php
  • (2)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