Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 03:51:56 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155543
Posts in
21714
Topics by
7737
Members
Latest Member:
simpleguy3
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
Foldergallery: Support & News
Pages:
1
[
2
]
Go Down
Author
Topic: Foldergallery: Support & News (Read 3250 times)
BlackBird
AddOn Development
Offline
Posts: 2069
Re: Foldergallery: Support & News
«
Reply #25 on:
November 02, 2011, 02:48:19 PM »
Yes, I worked on it in the past, but as I don't know what's the most current version (no one seems to know...), I don't feel like I should touch this. When I added some new feature some time ago, I was told I used the wrong version as base afterwards. Doesn't feel right.
In addition, I have no free time slots at the moment, no matter if paid or not. I'm sorry.
Logged
Alle großen Veränderungen beginnen im Kleinen
pcwacht
AddOn Development
Online
Posts: 2859
Re: Foldergallery: Support & News
«
Reply #26 on:
November 02, 2011, 08:47:25 PM »
Quote from: Argos on 23-10-2011
Quote
I found a bug. When you edit category details and use the Update Databse button after that, the module creates a copy of the complete category. Every time you use the update button, another copy is added.
Can't find bug (foldergallery 1.2.1 for wb282 ->
http://www.foldergallery.ch/pages/foldergallery/downloads.php
Used some pictures in diff folders and subfolders
After saving changed categoriie nothing strange happens.
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
marmot
Offline
Posts: 208
Re: Foldergallery: Support & News
«
Reply #27 on:
November 02, 2011, 11:15:32 PM »
Hi,
ok here are my 5 ct:
The problem only happens when a empty folder is created -> the db is synchronised -> a file is put into the folder -> the db is synchronised again.
This happens because when changing from emty to not emtpty the db entry for the category shoud be deleted and then rewritten again. But folders without parent are excepted in the delete query.
Therefore change backend.functions.p
hp line 253 to
Code:
$deleteSQL = "DELETE FROM ".TABLE_PREFIX."mod_foldergallery_categories WHERE parent_id >= '0' AND section_id=".$galerie['section_id'] ;
(insert change ">0" to ">=0") and hopefully be happy.
As the sync func is a little bit tricky I'm not sure about side effects, so try at your own risk
and let us know what happens.
regards
«
Last Edit: November 03, 2011, 11:57:00 AM by Argos
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #28 on:
November 03, 2011, 12:20:11 PM »
Marmot, you're the man! (unless you're a woman, in that case you're the woman
). It seems your little edit does the trick. Now there are no more duplicate folders created every time you update the database. GREAT!!
I see a lot of little things in this module that are not quite as they should be in my opinion (visual, usability, and language stuff), so I will try to improve it and post an update one of the module today or tomorrow. And then this will be the best full image gallery available. Apart from 2 or 3 other ones most of them are outdated, buggy stuff that shouldn't even be available anymore in my opinion.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
instantflorian
Betatester
Offline
Posts: 804
Re: Foldergallery: Support & News
«
Reply #29 on:
November 03, 2011, 01:51:47 PM »
Hi Argos,
If you are going to improve the folder gallery, could you have a look at the issue I already posted in the geraman tread? The FG stops working properly in the frontend, when PHP 5.3 runs on the server and/or allow_url_fopen is disabled.
See
here
.
Unfortunately, only the indeed outdated gallery scripts run on shared hosting, where mostly allow_url_fopen is disabled and the customer cannot reactivate it.
TIA
_florian.
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #30 on:
November 04, 2011, 02:58:25 AM »
I'm sorry, I am no coder and cannot fix that. Many shared hosting accounts don't have this limitation by the way, and WB will have more errors if allow_url_fopen is disabled. I think droplets and/or includes won't work either.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
BlackBird
AddOn Development
Offline
Posts: 2069
Re: Foldergallery: Support & News
«
Reply #31 on:
November 04, 2011, 08:45:39 AM »
allow_url_fopen defines if opening/reading files by URL is allowed or not. This means:
fopen(/path/to/local/file) will work
fopen(http://...whatever/file) won't work
As Droplets and includes are local, they should work without allow_url_fopen set to true, but there may be modules that need to open files remotely. It's used very often as an easy solution to read HTML from a remote page, for example. This can be done by using HTTP::* or Zend_HTTP_Client, too. These don't need allow_url_fopen = true. I needed this for "modulelist" Admin Tool, for example.
Don't know why FG needs to open URLs with fopen().
Logged
Alle großen Veränderungen beginnen im Kleinen
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #32 on:
November 04, 2011, 12:11:15 PM »
Thanks for your info Blackbird! I did a search in the FG module for "fopen", but that word doesn't seem to be in the code at all. So I'm not sure if the fopen server setting affects the module anyway. Maybe PHP5.3 is the cause? I cannot test that as I only have PHP5.2 hosting.
«
Last Edit: November 04, 2011, 12:12:48 PM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
instantflorian
Betatester
Offline
Posts: 804
Re: Foldergallery: Support & News
«
Reply #33 on:
November 04, 2011, 03:50:46 PM »
Hi,
I'm sorry, the error seems to have another reason. It's quite strange. In the same WB installation, the FG works with the default ALL CSS template, but not with the template I built for a page where I wanted to use the module - in this case it throws the PHP warnings and does not display the images. (No JavaScript errors, btw). Switching back to a template where the FG worked before, it doesn't work neither.
This will probably get quite hard to figure out what happens...
BR
_florian.
Logged
marmot
Offline
Posts: 208
Re: Foldergallery: Support & News
«
Reply #34 on:
November 05, 2011, 08:52:38 PM »
Hi,
maybe you should upload your template if you want some more help.
regards
Logged
pcwacht
AddOn Development
Online
Posts: 2859
Re: Foldergallery: Support & News
«
Reply #35 on:
November 06, 2011, 11:49:49 PM »
Try setting error all and notice and warning, so PHP will throw all errors.
I am curious to know the error here, since you stated:
1 - template all css all works
2 - switched to anopther template, it stopped working
3 - switched back to all css, no work
Might have to do with cookies/local stuff/browser caching?
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
instantflorian
Betatester
Offline
Posts: 804
Re: Foldergallery: Support & News
«
Reply #36 on:
November 07, 2011, 07:36:46 AM »
Hi,
I've found it. Quite simple: Fg does not work if the template uses the snippet which should avoid empty sections
Code:
<?php
ob_start
();
page_content
(
3
);
$content
=
ob_get_contents
();
ob_end_clean
();
if (
strlen
(
$content
) >
10
) {
?>
<div class="box-12-expand">
<?php page_content
(
3
);
?>
</div>
<?php
}
?>
Thank you anyway, BR
_florian.
Logged
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2297
Re: Foldergallery: Support & News
«
Reply #37 on:
November 07, 2011, 09:30:51 AM »
Not saying this is the cause of the problem, but the code you use has a flaw that can cause undesired side-effects.
If you have content in block 3, that content is processed twice.
First, using the ob_start / ob_end, the content is stored in a variable.
This variable is now used for the test to see there is something available, but is actually not used to output the data.
For the output the call page_content(3) is done the second time.
At first this is slower and using more resources on the webserver.
Secondly, it can cause errors because of (bad programmed) functions/classes being created twice, and therefore causing a fatal error in processing the webpage.
If you use the ob_start/ob_end functionality to capture output, always use
<?php
echo
$content_variable
;
?>
to output the captured content.
Logged
Professional WebsiteBaker Solutions
instantflorian
Betatester
Offline
Posts: 804
Re: Foldergallery: Support & News
«
Reply #38 on:
November 07, 2011, 12:59:01 PM »
Hi Ruud,
thanks for the advice. I will change it.
BR
_florian.
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #39 on:
November 24, 2011, 04:50:28 PM »
A new question about this module... The thumbnails for the albums are generated according to the settings (first, last, random). I have set it to use the first picture. This works fine, except for albums with sub albums. In that case the thumbnail is taken from one of the sub albums. Hoever it's not the first pic from the first sub album, as you might expect. It seems to be a random picture from a random sub album, yet it's always the same one. So there must be some "logic" behind the choice of the module, but I don't understand which one. Anyone have a clue?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
jrast
Offline
Posts: 315
Re: Foldergallery: Support & News
«
Reply #40 on:
November 25, 2011, 12:24:23 AM »
Hi Argos!
Have a look at the view.php, line 114-127! (
https://github.com/jrast/Foldergallery/blob/master/view.php#L114
)
Here you can find the logic and its something like this:
1. Get a random Picture of the current categorie
2. If the current categorie contains no images select the first image from the categorie with the lowest parent_id
So, as all the subcategories should have the same parent_id, the SQL statement is some kind of meaning less. It just selects always the same picture, but not the first picture of the first subcategorie...
As i have no running WB installation at the moment, i can't give you a working solution for this but you can try this:
Replace this code section:
Code:
if ($query->numRows() == 0) {
// OK, Categorie itself contains no images
$sql = 'SELECT file_name, id, parent_id FROM ' . TABLE_PREFIX . 'mod_foldergallery_files '
. 'WHERE parent_id IN (' . $catID . $catChilds . ') '
. 'ORDER BY parent_id ASC, ' . $catpicstring
. ' LIMIT 1;';
$query = $database->query($sql);
}
with this code:
Code:
if ($query->numRows() == 0) {
// OK, Categorie itself contains no images
$sql = 'SELECT file_name, id, parent_id FROM ' . TABLE_PREFIX . 'mod_foldergallery_files '
. 'WHERE parent_id IN (' . $catID . $catChilds . ') '
. 'ORDER BY ' . $catpicstring
. ' LIMIT 1;';
$query = $database->query($sql);
}
Let me know if this works!
«
Last Edit: November 25, 2011, 12:26:14 AM by jrast
»
Logged
- If life turns bad, just hang on! -
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #41 on:
November 25, 2011, 02:11:48 AM »
Hi jrast,
my view.php looks rather different:
Code:
<?php
// Direkter Zugriff verhindern
if (!
defined
(
'WB_PATH'
)) die (
header
(
'Location: index.php'
));
// check if module language file exists for the language set by the user (e.g. DE, EN)
if (!
file_exists
(
WB_PATH
.
'/modules/foldergallery/languages/'
.
LANGUAGE
.
'.php'
)) {
// no module language file exists for the language set by the user, include default module language file DE.php
require_once(
WB_PATH
.
'/modules/foldergallery/languages/DE.php'
);
} else {
// a module language file exists for the language defined by the user, load it
require_once(
WB_PATH
.
'/modules/foldergallery/languages/'
.
LANGUAGE
.
'.php'
);
}
// check if frontend.css file needs to be included into the <body></body> of view.php
if ((!
function_exists
(
'register_frontend_modfiles'
) || !
defined
(
'MOD_FRONTEND_CSS_REGISTERED'
)) &&
file_exists
(
WB_PATH
.
'/modules/foldergallery/frontend.css'
)) {
echo
'<style type="text/css">'
;
include(
WB_PATH
.
'/modules/foldergallery/frontend.css'
);
echo
"\n</style>\n"
;
}
// check if frontend.js file needs to be included into the <body></body> of view.php
if ((!
function_exists
(
'register_frontend_modfiles'
) || !
defined
(
'MOD_FRONTEND_JAVASCRIPT_REGISTERED'
)) &&
file_exists
(
WB_PATH
.
'/modules/foldergallery/frontend.js'
)) {
echo
'<script type="text/javascript" src="'
.
WB_URL
.
'/modules/foldergallery/frontend.js"></script>'
;
}
$generatethumbscounter
=
0
;
// Files includen
require_once (
WB_PATH
.
'/modules/foldergallery/info.php'
);
require_once (
WB_PATH
.
'/modules/foldergallery/scripts/functions.php'
);
// Foldergallery Einstellungen
$settings
=
getSettings
(
$section_id
);
$thumb_size
=
$settings
[
'thumb_size'
];
//Chio
$root_dir
=
$settings
[
'root_dir'
];
//Chio
$catpic
= (int)
$settings
[
'catpic'
];
//Chio
$ratio
=
$settings
[
'ratio'
];
//Pumpi
// Einstellungen
// Link zur Seite
$query_pages
=
$database
->
query
(
"SELECT link FROM "
.
TABLE_PREFIX
.
"pages WHERE page_id = '
$page_id
' LIMIT 1"
);
$page
=
$query_pages
->
fetchRow
();
$link
=
WB_URL
.
PAGES_DIRECTORY
.
$page
[
'link'
] .
PAGE_EXTENSION
;
$ergebnisse
= array();
// Da drin werden dann alle Ergebnisse aus der DB gespeichert
$unterKats
= array();
// Hier rein kommen die Unterkategorien der aktuellen Kategorie
$bilder
= array();
// hier kommen alle Bilder der aktuellen Kategorie rein
$error
=
false
;
$title
=
PAGE_TITLE
;
// Ist die angegebene Kategorie gültig? (erlaubter String)
if (isset(
$_GET
[
'cat'
])) {
$aktuelleKat
=
FG_cleanCat
(
$_GET
[
'cat'
]);
} else {
$aktuelleKat
=
''
;
}
// Die Kategorie ID wird erst für die Bilder gebraucht!
// Jedoch lässt sich so einfach feststellen ob eine Kategorie vorhanden ist
try {
$aktuelleKat_id
=
FG_getCatId
(
$section_id
,
$aktuelleKat
);
} catch (
Exception $e
) {
$aktuelleKat
=
''
;
$aktuelleKat_id
=
FG_getCatId
(
$section_id
,
$aktuelleKat
);
}
//SQL für die Kategorien
$sql
=
'SELECT * FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_categories WHERE '
.
'section_id='
.
$section_id
.
' AND parent="'
.
$aktuelleKat
.
'" AND is_empty=0 AND active=1'
.
' ORDER BY position ASC'
;
// OK, Angaben aus DB holen
$query
=
$database
->
query
(
$sql
);
while (
$ergebnis
=
$query
->
fetchRow
()) {
// Es gibt also folgende Kategorien mit Inhalt in dieser Kategorie
$ergebnisse
[] =
$ergebnis
;
}
if (
count
(
$ergebnisse
) ==
0
) {
$error
=
true
;
} else {
// Vorschaubild auswählen:
switch (
$catpic
) {
case
0
:
$catpicstring
=
'RAND()'
;
break;
case
1
:
$catpicstring
=
'position ASC'
;
break;
case
2
:
$catpicstring
=
'position DESC'
;
break;
default :
$catpicstring
=
'RAND()'
;
}
for (
$i
=
0
;
$i
<=
count
(
$ergebnisse
) -
1
;
$i
++) {
$cat
=
$ergebnisse
[
$i
][
'parent'
] .
'/'
.
$ergebnisse
[
$i
][
'categorie'
];
$unterKats
[
$i
][
'link'
] =
$link
.
'?cat='
.
$cat
;
$unterKats
[
$i
][
'name'
] =
$ergebnisse
[
$i
][
'cat_name'
];
$parent_id
=
$ergebnisse
[
$i
][
'id'
];
$folder
=
$root_dir
.
$cat
;
$pathToFolder
=
$path
.
$folder
.
'/'
;
$bildfilename
=
'folderpreview.jpg'
;
if (!
is_file
(
$pathToFolder
.
$bildfilename
)) {
// Vorschaubild suchen
$sql
=
'SELECT file_name, id, parent_id FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_files WHERE parent_id = '
.
$parent_id
.
' ORDER BY '
.
$catpicstring
.
' LIMIT 1;'
;
$query
=
$database
->
query
(
$sql
);
if (
$query
->
numRows
() ==
0
) {
$sql
=
'SELECT file_name, id, parent_id FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_files WHERE parent_id IN ('
.
$parent_id
.
$ergebnisse
[
$i
][
'childs'
] .
') ORDER BY '
.
$catpicstring
.
' LIMIT 1;'
;
$query
=
$database
->
query
(
$sql
);
}
$bildLinks
=
$query
->
fetchRow
();
$bildfilename
=
$bildLinks
[
'file_name'
];
//Falls es childs gab, k?nnte das Bild auch aus einem anderen Verzeichnis sein:
if (
$bildLinks
[
'parent_id'
] !=
$parent_id
) {
$sql
=
'SELECT parent, categorie, active FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_categories WHERE id = "'
.
$bildLinks
[
'parent_id'
] .
'";'
;
$query
=
$database
->
query
(
$sql
);
$ergebnisseneu
=
$query
->
fetchRow
();
$catneu
=
$ergebnisseneu
[
'parent'
] .
'/'
.
$ergebnisseneu
[
'categorie'
];
$folder
=
$root_dir
.
$catneu
;
if (
$ergebnisseneu
[
'active'
] ==
0
) {
$bildfilename
=
''
;
}
//echo '<br>Neu: '.$folder;
}
}
$pathToFolder
=
$path
.
$folder
.
'/'
;
$pathToThumb
=
$path
.
$folder
.
$thumbdir
.
'/'
;
$urlToFolder
=
$url
.
$folder
.
'/'
;
$urlToThumb
=
$url
.
$folder
.
$thumbdir
.
'/'
;
$unterKats
[
$i
][
'thumb'
] =
$urlToThumb
.
$bildfilename
;
//WB_URL.$bildLinks['thumb_link'];
// Eventuell wird die Gallerie zum ersten mal betrachtet
// Es gibt also noch kein Thumb. Also prüfen und erstellen
if (
$bildfilename
==
''
) {
//Leer oder ein Ordner
$unterKats
[
$i
][
'thumb'
] =
WB_URL
.
'/modules/foldergallery/images/folder.jpg'
;
} else {
$thumb
=
$pathToThumb
.
$bildfilename
;
if (!
is_file
(
$thumb
)) {
$file
=
$pathToFolder
.
$bildfilename
;
$terg
=
generateThumb
(
$file
,
$thumb
,
$thumb_size
,
0
,
$ratio
);
if (
$terg
<
0
)
$unterKats
[
$i
][
'thumb'
] =
WB_URL
.
'/modules/foldergallery/images/broken'
.
$terg
.
'.jpg'
;
}
}
//Chio ENDE
}
}
// Gibt es Bilder in dieser Kategorie
$sql
=
'SELECT * FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_files WHERE parent_id="'
.
$aktuelleKat_id
.
'" ORDER BY position ASC;'
;
$query
=
$database
->
query
(
$sql
);
while (
$bild
=
$query
->
fetchRow
()) {
if (
$bild
[
'file_name'
] ==
'folderpreview.jpg'
)
continue;
$bilder
[] =
$bild
;
}
//echo '<h1>'.$aktuelleKat_id.'</h1>';
if (
count
(
$bilder
) !=
0
) {
$error
=
false
;
$temp
=
explode
(
'/'
,
$aktuelleKat
);
$bildkat
=
array_pop
(
$temp
);
$bildparent
=
implode
(
'/'
,
$temp
);
$sql
=
'SELECT * FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_categories WHERE section_id='
.
$section_id
.
' AND categorie="'
.
$bildkat
.
'" AND parent="'
.
$bildparent
.
'" LIMIT 1;'
;
$query
=
$database
->
query
(
$sql
);
$result
=
$query
->
fetchRow
();
$titel
=
$result
[
'cat_name'
];
$description
=
$result
[
'description'
];
if (!empty(
$result
[
'categorie'
]))
$folder
=
$root_dir
.
$result
[
'parent'
] .
'/'
.
$result
[
'categorie'
] .
'/'
;
else
$folder
=
$root_dir
.
$result
[
'parent'
] .
'/'
;
$pathToFolder
=
$path
.
$folder
.
'/'
;
$pathToThumb
=
$path
.
$folder
.
$thumbdir
.
'/'
;
$urlToFolder
=
$url
.
$folder
;
$urlToThumb
=
$url
.
$folder
.
$thumbdir1
.
'/'
;
}
// Zur�ck Link
if (
$aktuelleKat
) {
$temp
=
explode
(
'/'
,
$aktuelleKat
);
array_pop
(
$temp
);
$parent
=
implode
(
'/'
,
$temp
);
$back_link
=
$link
.
'?cat='
.
$parent
;
$hidden
=
''
;
} else {
$hidden
=
'style="display:none"'
;
$back_link
=
'#'
;
}
// Template
if (
file_exists
(
dirname
(
__FILE__
) .
'/templates/view_'
.
$settings
[
'lightbox'
] .
'.htt'
)) {
$viewTemplate
=
'view_'
.
$settings
[
'lightbox'
] .
'.htt'
;
// --- added by WebBird, 29.07.2010 ---
$t
= new
Template
(
dirname
(
__FILE__
) .
'/templates'
,
'remove'
);
// --- end added by WebBird, 29.07.2010 ---
}
// ----- jQueryAdmin / LibraryAdmin Integration; last edited 27.01.2011 -----
elseif(
file_exists
(
WB_PATH
.
'/modules/'
.
$settings
[
'lightbox'
].
'/foldergallery_template.htt'
) )
{
$viewTemplate
=
'foldergallery_template.htt'
;
$t
= new
Template
(
WB_PATH
.
'/modules/'
.
$settings
[
'lightbox'
],
'remove'
);
$parts
=
explode
(
'/'
,
$settings
[
'lightbox'
] );
echo
"[[LibInclude?lib="
.
$parts
[
0
].
"&plugin="
.
$parts
[
2
].
"]]"
;
}
elseif(
file_exists
(
WB_PATH
.
'/modules/jqueryadmin/plugins/'
.
$settings
[
'lightbox'
].
'/foldergallery_template.htt'
) )
{
$viewTemplate
=
'foldergallery_template.htt'
;
$t
= new
Template
(
WB_PATH
.
'/modules/jqueryadmin/plugins/'
.
$settings
[
'lightbox'
],
'remove'
);
echo
"[[jQueryInclude?plugin="
.
$settings
[
'lightbox'
].
"]]"
;
}
// --- end added by WebBird, 29.07.2010 ---
else {
$viewTemplate
=
'view.htt'
;
// --- added by WebBird, 29.07.2010 ---
$t
= new
Template
(
dirname
(
__FILE__
) .
'/templates'
,
'remove'
);
// --- end added by WebBird, 29.07.2010 ---
}
// --- commented by WebBird, 29.07.2010 ---
//$t = new Template(dirname(__FILE__).'/templates', 'remove');
$t
->
halt_on_error
=
'no'
;
$t
->
set_file
(
'view'
,
$viewTemplate
);
$t
->
set_block
(
'view'
,
'CommentDoc'
);
$t
->
clear_var
(
'CommentDoc'
);
$t
->
set_block
(
'view'
,
'categories'
,
'CATEGORIES'
);
$t
->
set_block
(
'categories'
,
'show_categories'
,
'SHOW_CATEGORIES'
);
$t
->
set_block
(
'view'
,
'images'
,
'IMAGES'
);
$t
->
set_block
(
'images'
,
'thumbnails'
,
'THUMBNAILS'
);
$t
->
set_block
(
'images'
,
'invisiblePre'
,
'INVISIBLEPRE'
);
// Für weitere Bilder
$t
->
set_block
(
'images'
,
'invisiblePost'
,
'INVISIBLEPOST'
);
$t
->
set_block
(
'view'
,
'hr'
,
'HR'
);
$t
->
set_block
(
'view'
,
'error'
,
'ERROR'
);
// Dieser Fehler wird nicht ausgegeben, BUG
$t
->
set_block
(
'view'
,
'pagenav'
,
'PAGE_NAV'
);
if (
$error
) {
$t
->
set_var
(
'FRONT_END_ERROR_STRING'
,
$MOD_FOLDERGALLERY
[
'FRONT_END_ERROR'
]);
$t
->
parse
(
'ERROR'
,
'error'
);
} else {
$t
->
clear_var
(
'error'
);
}
$t
->
set_var
(array(
'VIEW_TITLE'
=>
$title
,
'BACK_LINK'
=>
$back_link
,
'BACK_STRING'
=>
$MOD_FOLDERGALLERY
[
'BACK_STRING'
],
'HIDDEN'
=>
$hidden
,
));
// Kategorien anzeigen
if (
$unterKats
) {
//$t->set_var('CATEGORIES_TITLE', $MOD_FOLDERGALLERY['CATEGORIES_TITLE']);
foreach (
$unterKats
as
$kat
) {
$t
->
set_var
(array(
'CAT_LINK'
=>
$kat
[
'link'
],
'THUMB_LINK'
=>
$kat
[
'thumb'
] .
'?t='
.
time
(),
'CAT_CAPTION'
=>
$kat
[
'name'
]
));
$t
->
parse
(
'SHOW_CATEGORIES'
,
'show_categories'
,
true
);
}
$t
->
parse
(
'CATEGORIES'
,
'categories'
,
true
);
} else {
// Falls keine Kategorien vorhanden sind kann der Block gel�scht werden
$t
->
clear_var
(
'show_categories'
);
$t
->
clear_var
(
'categories'
);
}
// Fertig Kategorien angezeigt
// Bilder anzeigen
if (
$bilder
) {
$anzahlBilder
=
count
(
$bilder
);
if (
$anzahlBilder
>
$settings
[
'pics_pp'
]) {
$pages
=
ceil
(
$anzahlBilder
/
$settings
[
'pics_pp'
]);
}
if (isset(
$_GET
[
'p'
]) &&
is_numeric
(
$_GET
[
'p'
])) {
if (
$_GET
[
'p'
] <=
$pages
) {
$current_page
=
$_GET
[
'p'
];
} else {
$current_page
=
1
;
}
} else {
$current_page
=
1
;
}
$t
->
set_var
(
'CAT_TITLE'
,
$titel
);
$t
->
set_var
(
'CAT_DESCRIPTION'
,
$description
);
if (
is_numeric
(
$pages
)) {
$pages_navi
=
'<ul class="fg_pages_nav">'
;
for (
$i
=
1
;
$i
<=
$pages
;
$i
++) {
//erzeugt nur ein ?cat wenn auch $aktuelleKat nicht leer ist verhindert notice Warunung
if (empty(
$aktuelleKat
))
$pages_navi
.=
" <li><a href=\"
$link
?p=
$i
\""
;
else
$pages_navi
.=
" <li><a href=\"
$link
?cat=
$aktuelleKat
&p=
$i
\""
;
if (isset(
$_GET
[
'p'
]) &&
$_GET
[
'p'
] ==
$i
) {
$pages_navi
.=
' class="current"'
;
}
$pages_navi
.=
">
$i
</a></li> - "
;
}
$pages_navi
.=
'</ul>'
;
$t
->
set_var
(
array(
'PAGE_NAV'
=>
$pages_navi
,
'PAGE'
=>
$MOD_FOLDERGALLERY
[
'PAGE'
]
)
);
$t
->
parse
(
'PAGE_NAV'
,
'pagenav'
);
}
else {
$t
->
clear_var
(
'pagenav'
);
}
$offset
= (
$settings
[
'pics_pp'
] *
$current_page
-
$settings
[
'pics_pp'
] );
for(
$i
=
0
;
$i
<
$anzahlBilder
;
$i
++) {
$bildfilename
=
$bilder
[
$i
][
'file_name'
];
$thumb
=
$pathToThumb
.
$bildfilename
;
$tumburl
=
$urlToThumb
.
$bildfilename
;
$file
=
$pathToFolder
.
$bildfilename
;
if (!
is_file
(
$file
)) {
//echo '<h1>|'.$bildfilename.'|</h1>';
$deletesql
=
'DELETE FROM '
.
TABLE_PREFIX
.
'mod_foldergallery_files WHERE id='
.
$bilder
[
$i
][
'id'
];
$database
->
query
(
$deletesql
);
continue;
}
if (!
is_file
(
$thumb
)) {
$file
=
$pathToFolder
.
$bildfilename
;
$terg
=
generateThumb
(
$file
,
$thumb
,
$thumb_size
,
0
,
$ratio
);
if (
$terg
<
0
)
$tumburl
=
WB_URL
.
'/modules/foldergallery/images/broken'
.
$terg
.
'.jpg'
;
}
if (
$settings
[
'lightbox'
] !=
'contentFlow'
)
$timeadd
=
'?t='
.
time
();
else
$timeadd
=
''
;
$t
->
set_var
(array(
'ORIGINAL'
=>
$urlToFolder
.
$bildfilename
.
$timeadd
,
'THUMB'
=>
$tumburl
.
'?t='
.
time
(),
'CAPTION'
=>
$bilder
[
$i
][
'caption'
],
'NUMBER'
=>
$i
));
// Bild sichtbar oder unsichtbar?
if(
$i
<
$offset
) {
$t
->
parse
(
'INVISIBLEPRE'
,
'invisiblePre'
,
true
);
} elseif (
$i
> (
$offset
+
$settings
[
'pics_pp'
] -
1
)) {
$t
->
parse
(
'INVISIBLEPOST'
,
'invisiblePost'
,
true
);
} else {
$t
->
parse
(
'THUMBNAILS'
,
'thumbnails'
,
true
);
}
}
$t
->
parse
(
'IMAGES'
,
'images'
,
true
);
} else {
$t
->
clear_var
(
'thumbnails'
);
$t
->
clear_var
(
'images'
);
}
// Kategorien
if (
$bilder
&&
$unterKats
) {
$t
->
parse
(
'HR'
,
'hr'
,
true
);
} else {
$t
->
clear_var
(
'hr'
);
}
if (
$aktuelleKat
!=
''
) {
$path
=
explode
(
'/'
,
$aktuelleKat
);
$bread
=
'<ul class="fg_pages_nav">'
.
'<li><a href="'
.
$link
.
'">'
.
$MOD_FOLDERGALLERY
[
'BACK_STRING'
]
.
'</a></li>'
;
// first element is empty as the string begins with /
array_shift
(
$path
);
foreach (
$path
as
$i
=>
$cat_name
) {
$catres
=
$database
->
query
(
"SELECT cat_name FROM "
.
TABLE_PREFIX
.
"mod_foldergallery_categories WHERE categorie = '
$cat_name
' LIMIT 1"
);
$cat
=
$catres
->
fetchRow
();
$bread
.=
' » <li><a href="'
.
$link
.
'?cat=/'
.
implode
(
'/'
,
array_slice
(
$path
,
0
, (
$i
+
1
)))
.
'">'
.
$cat
[
'cat_name'
] .
'</a></li> '
;
}
$bread
.=
'</ul><br /><br />'
;
$t
->
set_var
(
'CATBREAD'
,
$bread
);
$t
->
set_var
(
'CATEGORIES_TITLE'
,
$cat
[
'cat_name'
]);
}
$t
->
set_var
(
'WB_URL'
,
WB_URL
);
//überschreibt die fest eingestellte Größe von ul.categories li a auf die Thumbgrößenwerte
$catWidth
=
$settings
[
'thumb_size'
] +
10
;
if (
$settings
[
'ratio'
] >
1
) {
if (
$settings
[
'thumb_size'
] >=
150
)
$catHeight
=
$settings
[
'thumb_size'
] +
10
;
else
$catHeight
=
$settings
[
'thumb_size'
] /
$settings
[
'ratio'
] +
50
;
}
else {
if (
$settings
[
'thumb_size'
] >=
150
)
$catHeight
=
$settings
[
'thumb_size'
] +
10
;
else
$catHeight
=
$settings
[
'thumb_size'
] +
50
;
}
echo
'<style type="text/css">
ul.categories li a {
width: '
.
$catWidth
.
'px;
height: '
.
$catHeight
.
'px;
}
</style>'
;
ob_start
();
$t
->
pparse
(
'output'
,
'js'
);
$t
->
set_file
(
'view'
,
$viewTemplate
);
$t
->
set_var
(
'INCLUDE_PRESENTATION_JS'
,
ob_get_clean
());
$t
->
pparse
(
'output'
,
'view'
);
?>
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
jrast
Offline
Posts: 315
Re: Foldergallery: Support & News
«
Reply #42 on:
November 27, 2011, 03:14:52 PM »
@Argos:
wich version are you using?
Logged
- If life turns bad, just hang on! -
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #43 on:
November 27, 2011, 05:35:44 PM »
Quote from: jrast on November 27, 2011, 03:14:52 PM
@Argos:
wich version are you using?
http://www.foldergallery.ch/media/downloads/foldergalleryV1.21forWB2.8.2.zip
Info in info.php:
Code:
$module_directory
= 'foldergallery';
$module_name
= 'Foldergallery';
$module_function
= 'page';
$module_version
= '1.21';
$module_platform
= '2.80';
$module_author
= 'Jürg Rast; schliffer; Bianka Martinovic; Chio; Pumpi';
$module_license
= 'GNU General Public License';
$module_description = 'Bildergalerie anhand der Ordnerstruktur erstellen';
$module_home
= 'http://foldergallery.ch';
$module_guid
= 'C716E2D6-10C2-4D20-97AC-EFF428EADCAE';
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
jrast
Offline
Posts: 315
Re: Foldergallery: Support & News
«
Reply #44 on:
November 28, 2011, 08:53:07 PM »
Ok, the problem seems to be a little bit more complicated and I don't have a solution for this at the moment.
But you can find the Code which selects the preview thumb from line 116-119 in your version.
So you have to change these lines.
So basicly you have to change this code that the SQL ordering is not only for the cat_id but for the categorie order, wich is saved in another table (foldergallery_categ
ories). This should be possible with only one Statement.
Logged
- If life turns bad, just hang on! -
jrast
Offline
Posts: 315
Re: Foldergallery: Support & News
«
Reply #45 on:
December 31, 2011, 01:42:23 AM »
Dear Community
At the end of the year I have bad news for you.
I will no longer develop the foldergallery. There are different reasons for my desicion. For example I'm using another CMS for the Homepage I create and I don't have enough time to do all the work for the foldergallery. For more detailes please have a look at the
german thread
The Code is still available at
GitHub
so you can fork the foldergallery anytime you want.
I want to thank you for all the good ideas and the testing work you've done.
Jürg
Logged
- If life turns bad, just hang on! -
Argos
Moderator
Offline
Posts: 2161
Re: Foldergallery: Support & News
«
Reply #46 on:
December 31, 2011, 11:34:25 AM »
Thanks alot Jürg, I think FG is one of the best and most versatile image galleries available. I'm sure the community will keep using and improving it. So thanks for your work and efforts until now!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages:
1
[
2
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...