4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Rembrandt on October 31, 2009, 05:13:37 PM
-
Hi!
Mit dieser Modifikation wird das Random Bild zur Slideshow.
Neue Dateien:
fadeslideshow.js
jquery.min.js
Demo:demo.vienna-pictures (http://www.demo.vienna-pictures.com/index.php)
1.) erstellt einen neuen Ordner in euren root Ordner "js/fade_slide".
2.)lade euch die beiden Dateien "fadeslideshow.js" (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm) und "jquery.min.js" (http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js) und die im anhang befindlichen
png bilder herrunter, und Speicher sie in den neu erstellten Ordner "js/fade_slide" ab.
3.) wenn ihr die Slideshow nur auf eurer home.html sehen wollt, sucht in der index.php:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
und fügt darüber ein:
//#################################### Start Random Slide Show #################################################
$sql = "SELECT image_id, cat_id, user_id, image_name, image_media_file
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").") AND image_media_file LIKE '%.jpg'
ORDER BY RAND()
LIMIT 30";
$result = $site_db->query($sql);
$minis = "";
while($row = $site_db->fetch_array($result))
{
$minis .= "[\"./".THUMB_DIR."/".$row['cat_id']."/".$row['image_media_file']."\",";
$minis .= "\"".$site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id'])."\",\"\"";
//$minis .= ",\"".$row['image_name']."\"";
$minis .= "],";
}
$minis = substr($minis, 0, -1);
$max_width = $config['max_thumb_width'];
$max_hight = $config['max_thumb_height'];
$minislide ="
<script type=\"text/javascript\">
var mygallery=new fadeSlideShow({
wrapperid: \"fadeshow\",
dimensions: [$max_width, $max_hight],
imagearray: [$minis],
displaymode: {type:'auto', pause:1000, cycles:0, wraparound:true},
fadeduration: 600,
togglerid: \"fadeshowtoggler\"
})
</script>";
$minislide .= "<div class=\"head1\">";
$minislide .= "<span style=\"line-height:20px;vertical-align:middle;margin-left:3px;\">".$lang['random_image']."</span>";
$minislide .= "</div>";
$minislide .= "<div style=\"width:$max_width px;background-color:#e1e1e1\">";
$minislide .= "<div id=\"fadeshow\" style=\"margin-top:3px;\"></div>";
$minislide .= "<div id=\"fadeshowtoggler\" style=\"width:$max_width px;\">";
$minislide .= "<span style=\"float:left;margin-left:27px;margin-top:3px;\"><a href=\"#\" class=\"prev\"><img src=\"./js/fade_slide/bwd.png\" style=\"border-width:0;\" alt=\"prev\"></a></span>";
$minislide .= "<span class=\"status\" style=\"float:left;margin-top:3px;text-indent:3px;font-weight:lighter;\"></span>";
$minislide .= "<span style=\"float:right;margin-right:27px;margin-top:3px;\"><a href=\"#\" class=\"next\"><img src=\"./js/fade_slide/fwd.png\" style=\"border-width:0\" alt=\"next\"></a></span>";
$minislide .= "</div>";
$minislide .= "</div>";
$site_template->register_vars("minislide", $minislide);
//#################################### End Random Slide Show #################################################
wenn ihr die slideshow in all euren Template Dateien sehen wollt (home.- categorie.- details.htlm) dann sucht in der "includes/page_header.php":
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
und fügt den code darüber ein.
4.) sucht in der header.html:
{if has_rss}
und fügt darüber ein:
<script type="text/javascript" src="./js/fade_slide/jquery.min.js"></script>
<script type="text/javascript" src="./js/fade_slide/fadeslideshow.js">
/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
5.) in all euren templates Dateien wo ihr die Slideshow sehen wollt, sucht:
{endif random_image}
und fügt darunter ein:
<br>
{minislide}
in der includes/constants.php könnt ihr jetzt random image auf "0" setzen.
define('SHOW_RANDOM_IMAGE', 0);
Viel Spass!
mfg Andi
-
Cool, danke!
-
im sorry to say..
the template is messed up after instaling it correctly...please help me to get rid of this gray border... i have attached a screen shot..then u will understand
i changed every code u gave and treid to remove this border..but i faild :(
pls help :)
tnx in advance !
-
Hi!
....
i changed every code u gave and treid to remove this border..but i faild :(...
set in ACP/General/Settings "Max. width of thumbnail in pixel" and "Max. heigth of thumbnail in pixel".
or in the code, search:
$max_width = $config['max_thumb_width'];
$max_hight = $config['max_thumb_height'];
replace it with:
$max_width = "150";
$max_hight = "150";
mfg Andi
-
Hey..How to remove that gray colour border from it :( ? thanks !
i want to show the image and navigation buttons only :)
-
Hey..How to remove that gray colour border from it :( ? thanks !
i want to show the image and navigation buttons only :)
search in "fadeslideshow.js:
.css({position:'absolute', left:0, top:0, width:'100%', height:'100%', background:'#e1e1e1'})
change the value for background.
-
Thanks.. I Found A Small Bug :D
$minis .= "\"".SCRIPT_URL."/details.php?".URL_IMAGE_ID."=".$row['image_id']."\",\"\"";
must be changed it to
$minis .= "\"".$script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id']."\",\"\"";
Thanks..
-
"SCRIPT_URL" is defined in constans.php
-
hey..it ddnt work for me :( so i just pasted this code ...i mean the above code...then it worked..... :idea:
-
English Pleeeeeeeeeas
Pleeeeeas
i did it but there is a problem i'm useing short URL and it does't work with it
so i need help
-
"SCRIPT_URL" is defined in constans.php
By default it doesn't
-
...
By default it doesn't
you're right, I changed it.
mfg Andi
-
i can't understand this lang, please can you do this by english?
-
see the language translation tool on top of the page?
-
can we show this on a external web site :roll:
-
Hi,
ich habe den Mod eingebaut, und es funktioniert auch.
Aber eine Sache habe ich. Und zwar; wird ein Bild im Querformat geladen, und anschl. eins im Hochformat, sieht man links und rechts noch das vorherige Bild dahinter.
Was habe ich falsch gemacht?
Ein kleiner Anhang:
(http://www.goeff.de/bilder/slide.jpg)
Grüße
-
diesen effect hatte ich beim erstellen des mods auch, leider weis ich im moment nicht woran es lag.
-
Thanks for this great mod.
But i have 250px of my thumbnail in my gallery. I need to show slides with 150px width proportionally! How to do this? :(
-
....But i have 250px of my thumbnail in my gallery. I need to show slides with 150px width proportionally! How to do this? :(
search in fadeslideshow.js:
layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n'
and replace:
layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;width:150px" />\n'
mfg Andi
-
Where should be this param that to open in new blank? " target="_blank" "??
-
in index.php replace
$minis .= "\"".$site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id'])."\",\"\"";
with:
$minis .= "\"".$site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id'])."\",\"_blank\"";
-
hi,
wie kann ich das korrigieren?
das "button" zeigt so in IE und das foto in brauzer ie, ff, opera
danke
-
du kannst das hier versuchen:
http://www.4homepages.de/forum/index.php?topic=26198.msg142640#msg142640
und im code:
margin-left:27px;
den wert verringern z.b. 20px
-
Danke!
das hielft
$max_width = "150";
$max_hight = "150";