Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 4
Seite [1]
un1ty


Beginner




Beiträge: 17
# Thema - 20.11.2010 um 20:47 Uhr
Hello all, excuse me for using english, my german isnt that good.
my knowledge of PHP is too little to pull this off myself.

The thing i want to accomplish is to 'remove' the com_view in gallery,
instead, i want the lightbox to appear, when i click an image in a folder.

why do i want to do this?
the current gallery structure gives the following issue. whenever you go to gallery, select a folder, and after that click an image.
You end up on a page with one image, leaving the lightbox controlls disabled, to go to the next image you will first have to close the lightbox, go to the next page, and click the image again, to open it up in lightbox.

by having the images opened in lightbox on the (sub_)folder page you could skip from one image to another by using the controls in lightbox itself.

Could someone please assist me or publish the edited gallery tpl's/php's?
Inaktiv
un1ty
Thread-Ersteller


Beginner




Beiträge: 17
# Antwort: 1 - 24.11.2010 um 02:36 Uhr
Anyone? please?
it is for clansphere 2009.3 by the way.


Inaktiv
|
Tress13


Highlander




Herkunft: Lüdenscheid
Beiträge: 3048
# Antwort: 2 - 24.11.2010 um 09:31 Uhr
A control function would be good. Next and Back in the lightbox.


------------------


www.iv-gaming.de | www.iv-artwork.de

Inaktiv
|
un1ty
Thread-Ersteller


Beginner




Beiträge: 17
# Antwort: 3 - 25.11.2010 um 12:36 Uhr
I found a way to make it work,
Step 1: Go to system > options > gallery > Lightbox = NO

Step 2: go to http://www.lokeshdhakar.com/projects/lightbox2/#download
download the files and copy it into #root > mods/lightbox, after deleting the old files

Step 3:
Add the following code at the end of the header of the page:
mehr... +-
<link rel="stylesheet" href=""## COMPLETE PATH TO ROOT ##/mods/lightbox/css/lightbox.css" type="text/css" media="screen" />

<script src="## COMPLETE PATH TO ROOT ##/mods/lightbox/js/prototype.js" type="text/javascript"></script>
<script src="## COMPLETE PATH TO ROOT ##/mods/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="## COMPLETE PATH TO ROOT ##/mods/lightbox/js/lightbox.js" type="text/javascript"></script>

## COMPLETE PATH TO ROOT ##/mods/lightbox can be deleted, but if it malfunctions, please do add the path

Step 4:
Open list.php in #root > mods/gallery
mehr... +-
Replace: (line 313)
$img[$run]['link'] = cs_link($cs_lap, 'gallery', 'com_view', 'folders_id=' . $folders_id . '&where=' .
$cs_gallery[$run]['gallery_id']);

With:
$img[$run]['link'] = cs_html_link('mods/gallery/image.php?pic=' . $cs_gallery[$run]['gallery_id'],$cs_lap,0,0,0,'rel="lightbox [thispage]"');


Now open com_view.php in mods/gallery
mehr... +-

Replace: (line 197 to 220)
if($option['lightbox'] == '0' ) {
if(empty($cs_main['mod_rewrite'])) {
$data['data']['picture' ] = '<a href=uploads/gallery/pics/'. $cs_gallery['gallery_name'] . ' rel=\"lightbox\" title="'. $cs_gallery['gallery_name'] .'">' . $cs_lap . '</a>';
}
else {
$host = 'http://' . $_SERVER['HTTP_HOST'];
$host .= str_replace('index.php','',$_SERVER['PHP_SELF']);
$host .= 'mods/gallery/image.jpg?pic=' . $cs_gallery['gallery_id'];

$data['data']['picture'] = cs_html_link($host,$cs_lap);
}
}
else {
if(empty($cs_main['mod_rewrite'])) {
$data['data']['picture'] = cs_html_link('mods/gallery/image.php?&pic=' . $cs_gallery['gallery_id'],$cs_lap,0,0,0,'rel="lightbox" ');
}
else {
$host = 'http://' . $_SERVER['HTTP_HOST'];
$host .= str_replace('index.php','',$_SERVER['PHP_SELF']);
$host .= 'mods/gallery/image.php?&pic=' . $cs_gallery['gallery_id'];

$data['data']['picture'] = cs_html_link($host,$cs_lap,0,0,0,'rel="lightbox"');
}
}

With:
if($option['lightbox'] == '0' ) {
if(empty($cs_main['mod_rewrite'])) {
$data['data']['picture'] = cs_html_link('mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'],$cs_lap,0,0,0,'rel="lightbox" ');
}
else {
$host = 'http://' . $_SERVER['HTTP_HOST'];
$host .= str_replace('index.php','',$_SERVER['PHP_SELF']);
$host .= 'mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'];

$data['data']['picture'] = cs_html_link($host,$cs_lap,0,0,0,'rel="lightbox"');
}
}
else {
if(empty($cs_main['mod_rewrite'])) {
$data['data']['picture'] = cs_html_link('mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'],$cs_lap,0,0,0,'rel="lightbox" ');
}
else {
$host = 'http://' . $_SERVER['HTTP_HOST'];
$host .= str_replace('index.php','',$_SERVER['PHP_SELF']);
$host .= 'mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'];

$data['data']['picture'] = cs_html_link($host,$cs_lap,0,0,0,'rel="lightbox"');
}
}


Step 5: YOUR DONE
That should do the trick!

also check on your ajax settings, this should be disabled, im looking for a way to work around!
this script also adds the buttons 'next' and 'previous' to move from one image to another displayed in the current page of the folder


Zuletzt editiert von un1ty am 26.11.2010 um 00:01 Uhr (6x Editiert)
Inaktiv
|
mikeda


King for a day




Beiträge: 297
# Antwort: 4 - 17.12.2010 um 15:26 Uhr
ich habe das hier gerade entdeckt. Genau sowas habe ich gesucht. Nur leider klappt das bei mir nicht.
Hab alles genau nach Anleitung erledigt. Wenn ich nun auf ein Bild klicke, komme ich immer wieder zur
Gallery Übersicht. Gibt es hier schon eine Lösung, oder hatte jemand das selbe Problem und eine Lösung gefunden?

Ich habe Clansphere 2010.2 - Ajax aus - schöne URL`s an


Inaktiv
|
Antworten: 4
Seite [1]


Sie müssen sich registrieren, um zu antworten.