pragmaMx Support Forum

pragmaMx => Zusatzmodule => Thema gestartet von: shorty am 12 Dezember 2013, 12:12:07

Titel: Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: shorty am 12 Dezember 2013, 12:12:07
hello.  :smile:

I come because my siriusgallery block:  block-Sirius-header-center-NewestPictures
don't wanna link images to the detail page.
Also i come for ask if it's possible to re up old releases.
i run in 1.4 because 1.8.2 dont wanna upload images on my server [impossible to set number of pics can be upload by a member - always reach download quota don't know why. I've already open a support topic for this problem]. But i wanna try with other release more recent like 1.5.1 1.6 or 1.7 or 1.8 but i don't find a place where i can download it. So i don't know if be up to date will change this problem.

<?php
/**
 *
 * this is a part of SiriusGallery 
 *
 * $Version 1.0 $
 * $Author: Olaf Herfurth / TerraProject  http://www.tecmu.de $
 * $Date: 2011 $
 *
 *
 * modifyed by Olaf Herfurth / TerraProject (www.terraproject.de) 12/2009
 * Slideshow with javascript :
 *       Copyright 2000-2003 Patrick Fitzgerald
 *       http://slideshow.barelyfitz.com/
 */

defined('mxMainFileLoaded') or die('access denied');

/* //// Beginn Blockkonfiguration  ////////////////////////// */
// Module name
$modulename="SiriusGallery";

// ANzahl der Bilder im Block
$limit=8;

// Link auf Detailseite
$linkdetail=true;  // false=off , true=on

// Liste der Alben, aus denen keine Bilder angezeigt werden sollen. Die ID's durch Komma trennen.
$cathidden=""

// Zeit zwischen den Bildwechseln
$Slide_Timeout=5000;

// Höhe des Blockes in px
$scrollheight=520;

// Breite max des Bildes
$maxwidth=930;

// Effect Type
$type="fade";
// zoom, push, wipe, combo,fade, pan

$showTitle=true

include_once (
PMX_MODULES_PATH .$modulename.DS."core".DS."tabledef.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.sirius.php");
mxGetLangfile($modulename,"blocks.lang-*.php");

pmxHeader::add_style('modules/' $modulename '/style/js/moo_slideshow.css');
pmxHeader::add_script('modules/' $modulename '/style/js/mootools.js');
pmxHeader::add_script('modules/' $modulename '/style/js/moo_slideshow.js');
$SGCFG=getConfigAll();
$template=$SGCFG['FRONT_TEMPLATE'];
pmxHeader::add_style("modules".DS.$modulename.DS."style".DS."style.css");
pmxHeader::add_style("modules".DS.$modulename.DS."style".DS."blocks.css");
if (
is_file("modules".DS .$modulename.DS."templates".DS.$template.DS."blocks.css")) {
  
pmxHeader::add_style("modules".DS.$modulename.DS."template".DS.$template.DS."blocks.css");


$content="";


$subids=sg_getSubcatView(0);
$notcat= ($cathidden=="")?"":" and aid not in(".$cathidden.") ";

$result=sql_query("select pid,aid,title,userid,orig_url from ".SG_TABLE_PICTURE." where  aid in(".$subids.")".$notcat." and  published=1 and aid >0 order by datetime desc limit $limit");

$bid="_SG66";
$pic 0;
$out '';
while (
$row sql_fetch_array($result)) {
  
    
$picture str_replace("//","/",$row['orig_url']);
    
$piclink = ($linkdetail)?'modules.php?name=' $modulename '&amp;act=detail&amp;pic=' $row['pid']:'';
$title=($showTitle)?$row['title']:"";

$out .="imgs.push({
        file: '"
.$picture."',
        desc: '',
        title: '"
.$title."',
        url: '"
.$piclink."'
      });
"
;

    
$pic++;
}
//<a href=\"modules.php?name=$modulename\">$modulename</a>
//Expo.easeInOut
//Quad.easeInOut
//Cubic.easeInOut,
$content .= "  <div id=\"slidewrap\">
    <div id=\"slideshow"
.$bid."\"></div>
    <div id=\"loadingDiv\"></div>
  </div>
  <script type=\"text/javascript\">
    window.addEvent('domready', function(){
      var imgs = [];
"
.$out."
      var myshow"
.$bid." = new Slideshow('slideshow".$bid."', {
        type: '"
.$type."',
        showTitleCaption: 1,
        captionHeight: 25,
        width: "
.$maxwidth.",
        height: "
.$scrollheight.",
        pan: 50,
        zoom: 100,
        loadingDiv: 0,
        resize: true,
        duration: [2000, "
.$Slide_Timeout."],
        transition: Fx.Transitions.Quad.easeInOut,
        images: imgs,
        path: '"
.PMX_HOME_URL."/',
        showLink: false      });

      myshow"
.$bid.".caps.h2.setStyles({
        color: '#fff',
        fontSize: '13px'
      });

      myshow"
.$bid.".caps.p.setStyles({
        color: '#ccc',
        fontSize: '11px'
      });
    });
  </script>"
;

?>
Titel: Re:Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: Olaf / TerraProject am 12 Dezember 2013, 12:29:03
I'm sending you a link via PM
Titel: Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: shorty am 13 Dezember 2013, 13:26:26
Merci / Danke !  :smile:
Titel: Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: shorty am 21 Dezember 2013, 00:38:26
re  :smile:
So i've tried with every version but it's still not working 
i've can see now all java centers blocks come one time and diseappears one you click on
a linked image of block-Sirius-slide-center-NewestPictures.php and return to the home page   :puzzled:
block-Sirius-header-center-NewestPictures can't be clicked and diseappear after refreshing page
I've thinked at a cache problem and i've tried to activate/desactivate main cache and center blocks cache with the same result. I don't know why...
uploading image works  good 1.4 to 1.7.2 but still not working with 1.8.2  so i will stay with 1.7.2 for the moment...

Titel: problem homeblock don't reconize links reup old releases request
Beitrag von: shorty am 04 Januar 2014, 05:57:48
 Re @ all community

i try with another block called :
block-Sirius-center-NewestPictures.php

<?php
/**
 *
 * this is a part of SiriusGallery 
 *
 * $Version 1.0 $
 * $Author: Olaf Herfurth / TerraProject  http://www.tecmu.de $
 * $Date: 2011 $
 *
 *
 * modifyed by Olaf Herfurth / TerraProject (www.terraproject.de) 12/2009
 * Slideshow with javascript :
 *       Copyright 2000-2003 Patrick Fitzgerald
 *       http://slideshow.barelyfitz.com/
 */

defined('mxMainFileLoaded') or die('access denied');

/* //// Beginn Blockkonfiguration  ////////////////////////// */
// Module name
$modulename="SiriusGallery";

// ANzahl der Bilder im Block
$limit=5;

// Liste der Alben, aus denen keine Bilder angezeigt werden sollen. Die ID's durch Komma trennen.
$cathidden=""

// Zeit zwischen den Bildwechseln
$Slide_Timeout=8;

// Höhe des Blockes in px
$scrollheight=170;

// Breite max des Bildes
$maxwidth=500;
/* link zum Detailbild hinzufügen */
$linkdetail=true;
/* Titel anzeigen */
$showTitle=true

include_once (
PMX_MODULES_PATH .$modulename.DS."core".DS."tabledef.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.sirius.php");
mxGetLangfile($modulename);
$SGCFG=getConfigAll();

pmxHeader::add_script('modules/' $modulename '/style/js/jquery.cross-slide.js');
pmxHeader::add_script('modules/' $modulename '/style/js/jquery.easing.1.3.js');

$content="";

$notcat= ($cathidden=="")?"":" and aid not in(".$cathidden.") ";

$subids=sg_getSubcatView(0);
$result=sql_query("select pid,aid,title,userid,orig_url from ".SG_TABLE_PICTURE." where  aid in(".$subids.") ".$notcat." and  published=1 and aid >0 order by datetime desc limit $limit");

$bid="slideshow".rand(1000,9999); //
$pic 0;
$out '';
$output="";
$css="#".$bid." { width: ".$maxwidth."px;  height: ".$scrollheight."px; display:block;margin:auto;}
div.caption {
position: absolute;
margin-top: -45px;
margin-left: -75px;
width: 150px;
text-align: center;
left: 50%;
padding: 5px 10px;
background: black;
color: white;
font-family: sans-serif;
border-radius: 10px;
display:none; }
"
;
$content.="<div id=\"".$bid."\" >";

pmxHeader::add_style_code($css);
$crossfade=array("bottom left","bottom right","top left","top right","100% 50%","50% 50%","30% 80%","70% 20%","center left","center right","top center","bottom center","center center");
$zooom=array("0.5","1.25","1.5","0.6","1.75","0.75","1","0.8");

while (
$row sql_fetch_array($result)) {
  
    
$picture str_replace("//","/",$row['orig_url']);
    
$piclink = ($linkdetail)?'modules.php?name=' $modulename '&amp;act=detail&amp;pic=' $row['pid']:'';
$title=($showTitle)?$row['title']:"";
$fade=array_rand($crossfade,2);
$zoom=array_rand($zooom,2);
$out .="{
src: '"
.$picture."',
alt: '"
.$title."',
from: '"
.$crossfade[$fade[0]]." ".$zooom[$zoom[0]]."x',
to: '"
.$crossfade[$fade[1]]." ".$zooom[$zoom[1]]."x',
time: "
.$Slide_Timeout." ,
href : '"
.$piclink."' 
},"
;
    
$pic++;
}
$out=substr($out,0,-1);

    
$content .="</div>".(($showTitle)?"<div class=\"caption\" style=\"display:block;\"></div>":"")."
<script type=\"text/javascript\">\n
$('#"
.$bid."').crossSlide({
  fade: "
.intval($Slide_Timeout/4)."
  }, [ 
"
.$out."
],
function(idx, img, idxOut, imgOut) {
  if (idxOut == undefined)
  {
// starting single image phase, put up caption
$('div.caption').text(img.alt).animate({ opacity: .7 }),$('div.caption').show().css({ opacity: 0 })
  }
  else
  {
// starting cross-fade phase, take out caption
$('div.caption').fadeOut()
  }
});</script>"
;

?>


Links working but only admins can view images  :puzzled:
and few time before it's was working after a time (not immediately)
i don't why it's work for admin now
Userrs & Guests just see a black line in place of images.
I feel a cache problem but i really don't know...

regards.
longlife to pragmamx
Titel: Re:Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: Olaf / TerraProject am 04 Januar 2014, 12:08:05
please give me a admin-account (with PM)
I need to see that
Titel: Re:Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: shorty am 06 Januar 2014, 05:20:19
pm send
thanks for help  :smile:
Titel: Re:Sirius gallery. problem homeblock don't reconize links reup old releases request
Beitrag von: Olaf / TerraProject am 06 Januar 2014, 12:32:37
in the block is missing the jquery-call  :pardon:
insert before:
pmxHeader::add_script('modules/' . $modulename . '/style/js/jquery.cross-slide.js');

this code
pmxHeader::add_jquery();


Titel: Sirius gallery - A free open source media gallery for cms pragmaMx
Beitrag von: shorty am 07 Januar 2014, 07:21:38
 :thumbup:

Perfect it's working now !  :BD:

I started to fix the a problem for the link images block
block-Sirius-header-center-NewestPictures (absent in last version ?)
I use it because it's possible to choose different effects.
Now links working for one image on two. like working the first third etc... like 1.3.5.7...
i've changed at line 117 :
       showLink: false      });

by

       showLink: true      });


and an error inside the link adress (because non utf-8 characters encoding ?)
at line 87

   $piclink = ($linkdetail)?'modules.php?name=' . $modulename . '&amp;act=detail&amp;pic=' . $row['pid']:'';

replaced by

   $piclink = ($linkdetail)?'modules.php?name=' . $modulename . '&act=detail&pic=' . $row['pid']:'';
actual block :

<?php
/**
 *
 * this is a part of SiriusGallery 
 *
 * $Version 1.0 $
 * $Author: Olaf Herfurth / TerraProject  http://www.tecmu.de $
 * $Date: 2011 $
 *
 *
 * modifyed by Olaf Herfurth / TerraProject (www.terraproject.de) 12/2009
 * Slideshow with javascript :
 *       Copyright 2000-2003 Patrick Fitzgerald
 *       http://slideshow.barelyfitz.com/
 */

defined('mxMainFileLoaded') or die('access denied');

/* //// Beginn Blockkonfiguration  ////////////////////////// */
// Module name
$modulename="SiriusGallery";

// ANzahl der Bilder im Block
$limit=8;

// Link auf Detailseite
$linkdetail=true;  // false=off , true=on

// Liste der Alben, aus denen keine Bilder angezeigt werden sollen. Die ID's durch Komma trennen.
$cathidden=""

// Zeit zwischen den Bildwechseln
$Slide_Timeout=9000;

// Höhe des Blockes in px
$scrollheight=220;

// Breite max des Bildes
$maxwidth=430;

// Effect Type
$type="zoom";
// zoom, push, wipe, combo,fade, pan

$showTitle=false

include_once (
PMX_MODULES_PATH .$modulename.DS."core".DS."tabledef.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.php");
include_once (
PMX_MODULES_PATH .$modulename.DS."inc".DS."functions.sirius.php");
mxGetLangfile($modulename);

pmxHeader::add_jquery();
pmxHeader::add_style('modules/' $modulename '/style/js/moo_slideshow.css');
pmxHeader::add_script('modules/' $modulename '/style/js/mootools.js');
pmxHeader::add_script('modules/' $modulename '/style/js/moo_slideshow.js');
$SGCFG=getConfigAll();
$template=$SGCFG['FRONT_TEMPLATE'];
pmxHeader::add_style("modules".DS.$modulename.DS."style".DS."style.css");
pmxHeader::add_style("modules".DS.$modulename.DS."style".DS."blocks.css");
if (
is_file("modules".DS .$modulename.DS."templates".DS.$template.DS."blocks.css")) {
  
pmxHeader::add_style("modules".DS.$modulename.DS."template".DS.$template.DS."blocks.css");


$content="";


$subids=sg_getSubcatView(0);
$notcat= ($cathidden=="")?"":" and aid not in(".$cathidden.") ";

$result=sql_query("select pid,aid,title,userid,orig_url from ".SG_TABLE_PICTURE." where  aid in(".$subids.")".$notcat." and  published=1 and aid >0 order by datetime desc limit $limit");

$bid="_SG66";
$pic 0;
$out '';
while (
$row sql_fetch_array($result)) {
  
    
$picture str_replace("//","/",$row['orig_url']);
    
$piclink = ($linkdetail)?'modules.php?name=' $modulename '&act=detail&pic=' $row['pid']:'';
$title=($showTitle)?$row['title']:"";

$out .="imgs.push({
        file: '"
.$picture."',
        desc: '',
        title: '"
.$title."',
        url: '"
.$piclink."'
      });
"
;

    
$pic++;
}
//<a href=\"modules.php?name=$modulename\">$modulename</a>
//Expo.easeInOut
//Quad.easeInOut
//Cubic.easeInOut,
$content .= "  <div id=\"slidewrap\">
    <div id=\"slideshow"
.$bid."\"></div>
    <div id=\"loadingDiv\"></div>
  </div>
  <script type=\"text/javascript\">
    window.addEvent('domready', function(){
      var imgs = [];
"
.$out."
      var myshow"
.$bid." = new Slideshow('slideshow".$bid."', {
        type: '"
.$type."',
        showTitleCaption: 1,
        captionHeight: 25,
        width: "
.$maxwidth.",
        height: "
.$scrollheight.",
        pan: 50,
        zoom: 100,
        loadingDiv: 0,
        resize: true,
        duration: [2000, "
.$Slide_Timeout."],
        transition: Fx.Transitions.Quad.easeInOut,
        images: imgs,
        path: '"
.PMX_HOME_URL."/',
        showLink: true      });

      myshow"
.$bid.".caps.h2.setStyles({
        color: '#fff',
        fontSize: '13px'
      });

      myshow"
.$bid.".caps.p.setStyles({
        color: '#ccc',
        fontSize: '11px'
      });
    });
  </script>"
;

?>


Thanks for your help  :thumbup:
regards