how can I use a variable in my Text field instead of html?

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

how can I use a variable in my Text field instead of html?

Postby Esstee » Sat Jun 11, 2005 11:40 pm

I don't know if the title says much but, I am currently using anne rice
to convert some keywords, the output is pretty rediculous and in the process
of convincing the addon to do so I crashed Coranto several times.

So with this I think I'm using the anne rice way beyond its intended purpose.

Anyways I wanted to know if there was a way to end up using a TAG like a
BBcode or something in the Text field and then if I edited the field I would
always be seeing [img1] instead of the code the published story produced.

here is what I am doing at this time with anne rice:

original word:
Code: Select all
 [img1]


Replaced text:
Code: Select all
<table width="5" border="0" cellspacing="0" cellpadding="0"><tr><td><a href="javascript:void(0);" onClick="window.open('/web/phpthmb/demo/phpThumb.demo.showpic.php?src=http://www.mysite.com/imgdata/news/article_images/<Field: CustomField_Text_image1>&title=This+is+a+small+picture', 'showpic1', 'width=640,height=480,resizable=no,status=no,menubar=no,toolbar=no,scrollbars=no');"><img src="/web/phpthmb/phpThumb.php?src=/imgdata/news/article_images/<Field: CustomField_Text_image1>&w=325" border="0"></a></td></tr><tr><td height="6"></td></tr><tr><td height="35"><div align="justify" class="newsroom_update"><Field: CustomField_img_caption1></div></td></tr></table>


Like I said I know I'm using the addon out of context but I don't have the
expertise to produce the equivalent using perl in my style but I think that
would be optimum.

your help is apreciated as always.
I went deeper into the belly of Coranto and look! I found maginot.
User avatar
Esstee
 
Posts: 320
Joined: Thu Nov 25, 2004 4:13 pm
Location: Deep in some project

Postby Lumberjack » Sun Jun 12, 2005 1:51 am

Isn't this the same question as you posted in addon help? Anyway, it may be possible for you to set these things as custom variables, and just use <Field: CustomVariable1> in your styles... I don't know how that would affect your images, but I think you could probably set these varibles in cruser.pl (just a guess, never tried anything like that myself). I know you can set custom subroutines in there so... maybe it would work.
Lumberjack
 
Posts: 555
Joined: Wed Jan 10, 2007 7:22 pm
Location: Oxford, UK

Re: how can I use a variable in my Text field instead of htm

Postby Parahead » Sun Jun 12, 2005 8:35 pm

Esstee wrote:Anyways I wanted to know if there was a way to end up using a TAG like a
BBcode or something in the Text field and then if I edited the field I would
always be seeing [img1] instead of the code the published story produced.
I have been thinking about a sort of BBCode addon myself. The Anne Rice addon substitutes data on submission, I have been thinking about doing the replacing at build time. This would slow down the build but would make life esier during "edit news". I don't know, maybe LumberJack, (who wanted a small project) is interested in doing this?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron