bbcode is broken in my custom theme.

nsiguy
nsiguy's picture

Joined: 2006-08-28
Posts: 5
Posted: Fri, 2006-09-08 18:00

I made a custom theme called pacbamboo. I stripped out a lot of stuff. BBcode is enabled, but it doesn't work!

It works on a different theme, but not the one i modified.
it simply displays the BBcode un effected:
for example:
I like {list=I} {*}Oranges {*}Apples {*}Bananas {/list}
**note: replace { with [

Here is an example of it looks:
http://www.pacbamboo.com/main.php?g2_itemId=268
http://www.pacbamboo.com/main.php?g2_itemId=16

what could be happening?
Thanks in advanced for your attention.

Gallery version = 2.1.2 core 1.1.0.2
PHP version = 5.0.4 isapi
Webserver = Microsoft-IIS/6.0
Database = mysql 5.0.24-community-nt, lock.system=database
Toolkits = Exif, Thumbnail, Gd, SquareThumb
Acceleration = full/43200, none
Operating system = Windows NT WEBTHREE 5.2 build 3790
Default theme = pacbamboo
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-09-09 07:11

look in the *.tpl for standard themes... wherever you see something like {$theme.item.title|markup} the |markup thing will process the bbcode. so make sure your theme has |markup wherever it displays fields that could have bbcode like item titles, summaries, descriptions. and of course, make sure to select bbcode markup in site admin.

 
scormeny

Joined: 2006-06-27
Posts: 68
Posted: Fri, 2006-10-13 22:01

Mindless, could I ask for more BBCode advice? I understand the example you cite -- it's helpful to see it and be reminded of the way it works.

Here's another example where I need to manipulate the markup (in fact, I need to STRIP the bbcode, not turn it into HTML).

In a php function, I call $this->_tpl_vars['child']['title'], and send it as part of a form's entry to my shopping cart. Can I call something like $this->_tpl_vars['child']['title'][|markup:strip]?

This appears in the context of the larger php call:

{php}
		$ThumbURL = "";
		if (isset($this->_tpl_vars['theme']['item']['thumbnail']['id']))
			$ThumbURL = $this->_reg_objects['g'][0]->url(array('arg1' => "view=core.DownloadItem",'arg2' => "itemId=".($this->_tpl_vars['theme']['item']['thumbnail']['id'])), $this);
			
		Americart($this->_tpl_vars['theme']['item']['title'], 
			$this->_tpl_vars['AlbumPrice'], 
			$this->_tpl_vars['AlbumShipping'], 
			$this->_tpl_vars['AlbumItemNumber'],
			$ThumbURL, 
			$baseurl,
			$this->_tpl_vars['theme']['params']['CartID'],
			$this->_tpl_vars['theme']['item']['id'])
			;
		{/php}

Many thanks for advice.

-Sara

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-10-14 01:10

look in lib/smarty_plugins to find the name/parameters of the php function.. not sure why you need this from php code.
in smarty it would be {$child.title|markup:strip}