Edit Caption Font Size

markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Tue, 2007-03-20 23:31

Im trying to change the font size in the edit caption URL field. Does anyone know how to do this ?? I would greatly apreaciate any help , thanks.Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-04-06 04:50

what is the "edit caption URL field"?

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Fri, 2007-04-06 13:00

Its right below where you put the title of the pic under summary it allows you to put a url in. I tried using some diferent code to change the font size but it just doesnt work for me.

example code
url=http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=925785-0000&PA=1487197&HTML=http://www.nextdoor-models.com/fhgs/bia01/bia01.htm]Click Here For Nice Looking babes[/url

I also would like to have it open in a new window but I couldnt get it to do that either, any suggestions would be greatly appreciated. Could you help me to modify the above code for a larger font and open in a new window?
Thanks

Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-04-06 15:53

bbcode (intentionally) limits when you can do. if you wish, visit Site Admin / General and change the site to use full html. then you can put <font> or <script> or whatever you like in your captions. this may be ok if only you have edit privileges.. it's risky if others can add stuff, as they could put <script> tags that do bad things..

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-04-06 15:55

alternatively, if you have some coding ability you could edit lib/smarty_plugins/modifier.markup.php and make the bbcode syntax support the things you want.. for example, add [=..]text[/] support and/or [url=.. popup=true]..[/url]

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Fri, 2007-04-06 16:12

Ill try that because Im not alowing others to post.

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Sun, 2007-04-08 15:48

I took a look at the markup.php but Im not sure how to add these two things, Im just learning PHP. Cn you give me an exaple of code and where to put it in?

Thanks
Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2007-04-08 16:11

look at the existing $this->_bbcode->addCode calls.. you can add more calls to support additional [..] tags.
easiest is the ones that say 'simple_replace'. you could make [big] and [/big] be replaced with <font size="+2"> and </font>.
to be more advanced you can use the 'callback_replace' type.. see how these call the function url and function color in this file, for examples.

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Sun, 2007-04-08 16:26

Thanks, I have to go to a family thing but ill try when I get home.

Thanks

mark

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Sun, 2007-04-08 23:00

Im not sure exactly what you mean I see simple replace in the file but do not see [Big]can you explain a little more detailed I would greatly appreciate it.
Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2007-04-09 03:36

existing code:

        $this->_bbcode->addCode('i', 'simple_replace', null,
                                array('start_tag' => '<i>', 'end_tag' => '</i>'),
                                'inline', array('listitem', 'block', 'inline', 'link'), array());

if you copy this and just change the 'i' and start_tag/end_tag values then you get support for a new simple tag.
example:

        $this->_bbcode->addCode('big', 'simple_replace', null,
                                array('start_tag' => '<font size="+2">', 'end_tag' => '</font>'),
                                'inline', array('listitem', 'block', 'inline', 'link'), array());
 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Mon, 2007-04-09 13:17

I found the code
$this->_bbcode->addCode('i', 'simple_replace', null,

but could not find the code
array('start_tag' => '<i>', 'end_tag' => '</i>'),
I am using gallery 2.1.2

I appreciate all your help with this, thanks

mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2007-04-09 14:20

even though the 2.1.x code is a little different, you should be able to apply the concept i describe above.. you can see how 'i' is mapped to <i> and </i>.. give it a shot.

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Mon, 2007-04-09 16:46

I tried this but it didnt seem to make a difference.

$this->_bbcode->addCode('b', 'simple_replace', null, array ('<b>', '</b>'),
'inline', array ('listitem', 'block', 'inline', 'link'), array ());
$this->_bbcode->addCode('i', 'simple_replace', null, array ('<font size="+4>', '</font>'),
'inline', array ('listitem', 'block', 'inline', 'link'), array ());

Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-04-10 05:33

you're missing a " after +4
once this code change is in place in lib/smarty_plugins then you can add or view captions with [ i]..[/i] (space added so it isn't parsed by this forum) and it will be big instead of italic. of course make sure bbcode is your markup type in site admin / general.

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Tue, 2007-04-10 13:21

Ok Ive added the " I am very new to this so it still doesnt seem to work. When IO add the URL during the edit caption process do I need to add the font size info in the html code

<font size="+4">Hot babes </font

Im still not sure how to make it work.

mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-04-10 15:05

did you add a caption using bbcode?
add a caption with this, but remove the space right after the first [

[ i]test[/i]

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Tue, 2007-04-10 19:24

Im a little lost can you give me just a little more detail Im sorry for being new to this but I really appreciate your egforts to help me.
Thanks

mrk

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Tue, 2007-04-10 19:30

I added what ou had asked me to in the url field and itr showed test in big letters
test.

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Wed, 2007-04-11 22:17

I know Ive already asked but I sure could still use your help with this.

Thanks
Mark

 
markmusicman

Joined: 2004-12-21
Posts: 31
Posted: Fri, 2007-04-13 12:02

I changed it to use HTML and was able to fix ther issue by editing pics one at a time , if I tried to edit all of them together I would get a cache error page.

Thanks

mark