Posted: 2007-06-19 05:04:52
Yes i thought that so but it doesn't work.
It's have , seprated but i can't selected just one subtitel.
It's have , seprated but i can't selected just one subtitel.
Official Forum
https://forum.antp.be/phpbb3/
Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div>
<div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
little change, it should beJ.P. wrote:It's still not working.
I haveThe subtitels are , seperated but not seperated to click on it.Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div> <div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
Code: Select all
<div class='subtitles'><b>$LANG[SUBTITLES]: </b>
{SUBTITLES;, }<a href='$SUBTITLE[HREF]'>$SUBTITLE[TEXT]</a>{/SUBTITLES}</div>
Code: Select all
<div class='country'><b>$LANG[country]: </b>
{COUNTRYS;, }<a href='$COUNTRY[HREF]'>$COUNTRY[TEXT]</a>{/COUNTRYS}</div>
Ok thanks, it's works...kazgor wrote:little change, it should beJ.P. wrote:It's still not working.
I haveThe subtitels are , seperated but not seperated to click on it.Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div> <div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
the magic is done by the {SUBTITLES;, } bit.Code: Select all
<div class='subtitles'><b>$LANG[SUBTITLES]: </b> {SUBTITLES;, }<a href='$SUBTITLE[HREF]'>$SUBTITLE[TEXT]</a>{/SUBTITLES}</div>
infact all the fields that are in the $this->config['options']['comma_seperated'] field can have the above done.
eg.. let pic country it would be
from the code, it takes the field name eg SUBTITLES, removes the last S if its there.. and then puts an S at the end. this is what you then use inside the { }, so for SUBTITLES it stayes the same, but from COUNTRY it becomes COUNTRYSCode: Select all
<div class='country'><b>$LANG[country]: </b> {COUNTRYS;, }<a href='$COUNTRY[HREF]'>$COUNTRY[TEXT]</a>{/COUNTRYS}</div>
next you use $COUNTRY or $SUBTITLE is now an array, HREF being the URL, and TEXT being the displayed field.
Kaz.
$ACTORS are treated differently to say $SUBTITLES/$COUNTRY, ACTORS are sent through some additional filtering/splitting up routine.check out inJ.P. wrote:Ok thanks, it's works...
What is the differense between $SUBTITLE[TEXT] and $ACTOR[NAME], i mean the NAME and TEXT
I LOVE IT!My little modification: http://cconradd.dvd.pl/ grin
What do you think? grin
Yeah, it work. Thank you !kazgor wrote:Images should go into the antexport directory.
from your page that looks like its httpdocs/moviesdb/antexport/
and your images are called - moviesdb_1.jpg,
Thank's !I have a other question, if I update my AMC Base (if I add a new movie for an example), must I export all the base again and import it entierly again on my database? Or maybe there is an other way?
Yes, it work! thank you a lot!Thermal Ions wrote:No need to re-import all movies again
When you are exporting from AMC, make sure to have the movies you have added or updated selected first, then chose export to SQL. On this export screen there is a tick box to "Update instead of Insert", tick this and make sure that down the bottom "Movies to include" has the "Selected ()" radio button chosen. Can't recall for sure but you may have to also make sure the Number field is in the list to export (I have a feeling it isn't by default - can't check at the moment sorry).
One caveat here - don't do this sort of update if you've renumbered your movies as your MySQL database can get all mixed up.
Then all you need to do is upload the resulting nice and small sql file and any new images to your web server's antexport directory as normal.
Cheers.......Thermal
Thermal's Movie & TV Series db
exporte en latin1 lit les post precedentUne derniere question!
Quand j'exporte via SQL et que j'importe dans le template, tous les caractères spéciaux comme "é", "à" etc... disparaissent et le reste du texte aussi.
Par exemple : "Il est méchant" donnera "Il est m"
Code: Select all
// Check the file exists, if not use the default
Code: Select all
$picdir = '../../../../pics/'; // location of your images folder
// Check the file exists, if not use the default
// yes I know this replaced can be made to look neater
$img = $_GET['img'];
$img = str_replace("The ", " ", $img);
$img = str_replace(", The", "", $img);
$img = str_replace("/", "", $img);
$img = str_replace(":", "", $img);
$img = str_replace(" ", "", $img);
$img = $img.".jpg";
$img = $picdir.$img;
Code: Select all
function template() {
$tpl = new Template($this);
# Create a list of easy to convert variables.
$easyvars = array('NUM', 'CHECKED', 'MEDIA', 'MEDIATYPE', 'SOURCE', 'BORROWER', 'RATING',
'ORIGINALTITLE', 'FORMATTEDTITLE', 'COUNTRY', 'CATEGORY', 'YEAR', 'LENGTH', 'URL', 'COMMENTS',
'VIDEOFORMAT', 'VIDEOBITRATE', 'AUDIOFORMAT', 'AUDIOBITRATE', 'RESOLUTION', 'FRAMERATE', 'LANGUAGES',
'SUBTITLES', 'FILESIZE', 'DISKS', 'PICTURENAME');
# Loop through all the easyvars
foreach($easyvars as $dbfield) {
$tpl->add_var("\$MOVIE[$dbfield]", $this->data[$dbfield]);
$tpl->add_var("\$MOVIE[".$dbfield."_HREF]", $this->_href($this->data[$dbfield], $dbfield));
if (in_array($dbfield, $this->mdb->config['options']['comma_seperated'])) {
# Remove any ending 'S' in the variable name.
$varname = ((substr($dbfield, -1) != "S") ? $dbfield : substr($dbfield, 0, -1));
$tplname = $varname."S";
$subtpls = $this->_templates_comma_seperated($dbfield, $varname);
$tpl->add_subtpl($tplname, $subtpls);
}
}
$date_added = date($this->mdb->config['options']['date_format'], strtotime($this->data['DATEADD']));
// my code
$webtitle = $this->data['FORMATTEDTITLE'];
$webtitle = str_replace("'", "", $webtitle); //remove apostrophe
$tpl->add_var("\$MOVIE[WEBTITLE]", $webtitle);
//end of my code
$tpl->add_var("\$MOVIE[DATEADD]", $date_added);
$tpl->add_var("\$MOVIE[HREF]", $this->mdb->get_link(array("NUM" => $this->data['NUM'])));
$tpl->add_callback("\$MOVIE[DESCRIPTION]", "_callback_description", 1);
$tpl->add_subtpl("TRANSLATEDTITLES", $this->_templates_translatedtitles());
$tpl->add_subtpl("ACTORS", $this->_templates_names("ACTORS", "ACTOR", $this->actors));
$tpl->add_subtpl("DIRECTORS", $this->_templates_names("DIRECTORS", "DIRECTOR", $this->directors));
$tpl->add_subtpl("PRODUCERS", $this->_templates_names("PRODUCERS", "PRODUCER", $this->producers));
return $tpl;
}
Code: Select all
src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=160'
Code: Select all
src='$TEMPLATEDIR/images/image.php?img=$MOVIE[WEBTITLE]&w=160'