PDA

View Full Version : Can u advise me on {1} in a phrase?


b6gm6n
11-24-2005, 11:35 AM
Hi..

I've made a simple plugin which calcs the amount of pictures in my gallery, using : $totalphotos : i can use this in a template or a php file and the total number shows, but in a phrase i don't understand how to implement it

I'd like to use "I have {1} photos" in a phrase, but how do i set this up? i've added a custom phrase "<phrase 1="$totolphotos">$vbphrase[phottot]</phrase>" but i cannot call is or use it...i dunno, i keep seeing "i have fag.php photos" or whatever...please advise, cheers

-b6

Boofo
11-24-2005, 11:42 AM
make a phrase called phottot and add the I have {1} photos to it. then use this to call it in the template:

phrase 1="$totolphotos">$vbphrase[phottot]</phrase>

Make sure you are doing the query to get that info somewhere.

calorie
11-24-2005, 11:45 AM
Set your custom phrase:

varname: i_have_x_photos
text: I have {1} photos

Use this in your template:

<phrase 1="$totalphotos">$vbphrase[i_have_x_photos]</phrase>

LOL, Boofo was faster...

b6gm6n
11-24-2005, 02:03 PM
hi thanx guys, but thats the problem, im not using it in a template, just a phrase...so "<phrase 1="$totalphotos">$vbphrase[i_have_x_photos]</phrase>" would work in a phrase? or would i have to place that into say my navbar template, im using this in conjunction with the welcome headers mod and it uses phrases which i hoped "I have {1} photos" will work :) i bet it does you clever people, thanx guys, i'll try this later

-b6

Set your custom phrase:

varname: i_have_x_photos
text: I have {1} photos

Use this in your template:

<phrase 1="$totalphotos">$vbphrase[i_have_x_photos]</phrase>

LOL, Boofo was faster...

didn't work! done exactly what you said...
but i dont have a template to add : <strong><phrase 1="$totalphotos">$vbphrase[i_have_x_photos]</phrase></strong> <- just added that to my phrase, see, sgurl.org/forums for the result! :)

-b6

cant be done, i've added it manually :)

-=b6