The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Help needed using bbcode_parser on non forum text
Hi
I'm using the following code to parse forum text. This is in a VBa CMPS module I have written that displays from selected forum posts in a list of 'Whats Occurring' on my site home page Code:
require_once(DIR . '/includes/class_bbcode.php'); $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list(),true); $occuredUser[$i]['announcetxt'] = $bbcode_parser->parse($occuredUser[$i]['announcetxt'], $forum['nonforum'], true); However it does not Parse smilies (they just don't show up when the parsed text is output) Smilies are enabled on my site and work in forums, PMs etc What am I doing wrong? Cheers Rich --------------- Added [DATE]1307283641[/DATE] at [TIME]1307283641[/TIME] --------------- Had a play a bit further but still can't sort this myself In Vbulletin OPtions -> BB Code Settings Allow Smilies in Non Forum Specific Areas = Yes I also tried the following as it seemed promising... Code:
$occuredUser[$i]['announcetxt'] = $bbcode_parser->parse($occuredUser[$i]['announcetxt'], 'nonforum', true); $occuredUser[$i]['announcetxt'] = $bbcode_parser->parse_smilies($occuredUser[$i]['announcetxt'], true); Parsed text OK, no smilies still - and a headache coming on |
#2
|
||||
|
||||
It's a dirty solution but I have come across this issue myself...
change: Code:
$occuredUser[$i]['announcetxt'] = $bbcode_parser->parse($occuredUser[$i]['announcetxt'], $forum['nonforum'], true); |
#3
|
||||
|
||||
Tried what you said Joe and had no joy with that. I banged my head against this for another hour
I even in desparastion tried a temporary edit of class_bbcode.php on my test site, adding another case of 'test' to the Switch statement where I declared the $dohtml, $dobbcode, $doimagecode, $dosmilies all to = true..... and I still got no smilies Then just as I was going to post back here with my woes it dawned on me what is going on and I looked at the page html source bbcode parser is indeed parsing the damn smilies (and possibly was all along) the real problem is it produces html like <img src="images/smilies/new/googled.gif ..... /> And that ain't gonna work on my homepage as from my VBa module I am executing in http://swapscene.com and not http://swapscene.com/forums so of course the path is wrong and nothing shows up!!! Now how the hell do I get myself out of that one? Rich |
#4
|
||||
|
||||
Quote:
Again I was in a similar situation. What I ended up doing was editing my smileys to change their paths from "image/smilies/happy.gif" to "/forums/images/smilies/happy.gif" This will insure they display properly on all pages they are called. I was also told instead of editing every single smiley I could have used the "replacement variable manager" in the styles to replace images/smilies with /forums/images/smilies and get the same results. |
#5
|
||||
|
||||
OK thanks once again Joe I'll give that a go
Sounds better than my idea overnight to search the parsed string and replace the offending links! Yes agreed the browser not showing broken image place holders did not help, but then again I put it down to my own inexperience not thinkg to look at the page source! Only been programming php for less than a year so another lesson learned the hard way! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|