hi
what do i need to change to replace
the $catalias variable in span lightbox rel='lightbox-$catalias on the final view with
filename (from sql database) table phocagallery - need for a big change in the JS of slimbox the path/filename for the link and the catalias shows lightbox-categoryname in lowercase
the slimbox does not function without the lightbox- in front of it or does it? can it be done without? or what would be the JS code to cut away the first 9 characters?
thank you very much, ...greatly, ...
and sorry for the weird description, it is late and i do not know at the moment how to describe it better
best regards,
stefan
replacing sql data in the image view page
-
vux-at
- Phoca Newbie

- Posts: 7
- Joined: 16 Jan 2013, 00:40
-
vux-at
- Phoca Newbie

- Posts: 7
- Joined: 16 Jan 2013, 00:40
Re: replacing sql data in the image view page
ok, found out how it works withouth the 'lightbox' in the rel part
just delete the && el.rel.test(/^lightbox/i) in the JS of slimbox
or would it be ok to add a rel2='$pathandfilename'? (clean code)
this would not change any of the underlying code and the js could load the rel2 for all the other data it needs
just delete the && el.rel.test(/^lightbox/i) in the JS of slimbox
or would it be ok to add a rel2='$pathandfilename'? (clean code)
this would not change any of the underlying code and the js could load the rel2 for all the other data it needs
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: replacing sql data in the image view page
Hi, if you don't get any error, both of the methods are Ok, I think 
If you find Phoca extensions useful, please support the project
-
vux-at
- Phoca Newbie

- Posts: 7
- Joined: 16 Jan 2013, 00:40
Re: replacing sql data in the image view page
ok, thx - i guess
so - how do i get the mysql filename into that rel or rel2 ?
what changes are to be done in
renderfront
detail
default_images
so - how do i get the mysql filename into that rel or rel2 ?
what changes are to be done in
renderfront
detail
default_images
-
vux-at
- Phoca Newbie

- Posts: 7
- Joined: 16 Jan 2013, 00:40
Re: replacing sql data in the image view page
hi jan
any updates on this subject?
please help me on the changes in these few php files
i just need to get the mysql $filename entry into the rel='' or rel2='' part
the rest i can do in the js with ease
thank you very much
best regards,
stefan
any updates on this subject?
please help me on the changes in these few php files
i just need to get the mysql $filename entry into the rel='' or rel2='' part
the rest i can do in the js with ease
thank you very much
best regards,
stefan
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: replacing sql data in the image view page
Hi, unfortunatelly I am not on my PC now to do tests in the code, so really cannot say what exactly should be modified
( forum-rules.php (9) )
just print_r the image variable to see which objects you have there (there should be the path too) - so there you should find the filename and the path you get from $this->tmpl['path'] variable or you can call it: PhocaGalleryPath::getPath(); (there are different paths used in Phoca Gallery)
Jan
just print_r the image variable to see which objects you have there (there should be the path too) - so there you should find the filename and the path you get from $this->tmpl['path'] variable or you can call it: PhocaGalleryPath::getPath(); (there are different paths used in Phoca Gallery)
Jan
If you find Phoca extensions useful, please support the project
-
vux-at
- Phoca Newbie

- Posts: 7
- Joined: 16 Jan 2013, 00:40
Re: replacing sql data in the image view page
ok for everyone who is interested to have working download link(s) in slimbox here is a solution
in
default_images.php (components/com_phocagallery/views/category/tmpl)
add beneath
the following
then change your slimbox.js to act like this (the autoload code block) (Text and Link details must be adjusted to your needs of course!!)
thanks to jan for the little hint
in
default_images.php (components/com_phocagallery/views/category/tmpl)
add beneath
Code: Select all
// A Start
echo '<a class="'.$value->button->methodname.'"';Code: Select all
echo ' lblink="'.$value->filename.'"';Code: Select all
// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
Slimbox.scanPage = function() {
$$($$("a").filter(function(el) {
return el.rel;
})).slimbox({/* Put custom options here */}, function(el) {
return [el.href, el.title + '<br /><a href="' + el.href + '" target="_blank">Webversion downloaden</a><br /><a href="./' + el.getAttribute("lblink") + '" target="_blank">10x15 Format downloaden</a><br /><a href="http://ANY.SITE.YOU/WANT/' + el.getAttribute("lblink") + '" target="_blank">ANY OTHER FORMAT</a>'];
}, function(el) {
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
};
window.addEvent("domready", Slimbox.scanPage);thanks to jan for the little hint
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: replacing sql data in the image view page
Great, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project