Make Lightbox 1.0 simple enhancement for phpwcms contentpart

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Post by culda_a »

I try to install the lightbox , the first problem was that I try to download the files from this topic but is not working, second I have copy from another site the files but when I press on the picture is apear only the picture without efects
ImagePackging design,labels, catalogs,postcards,
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

culda_a wrote:I try to install the lightbox , the first problem was that I try to download the files from this topic but is not working, second I have copy from another site the files but when I press on the picture is apear only the picture without efects
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Post by culda_a »

why is not working the lightbox anymore???? it apears a lot of images and is not working
ImagePackging design,labels, catalogs,postcards,
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

culda_a wrote:why is not working the lightbox anymore???? it apears a lot of images and is not working
sorry for no reply, the last time i've answered, i could not posting, because I was kicked out by spam protection of this forum.
I've changed the links on my first post.
please download again and try.
If it not work, please send me a link if possible.
best
marcus
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

article image (enlarge image)...use lightbox?

Post by anthony.abraira »

does anyone know if its possible to implement the lightbox feature to all articles that have the "enlarge image" option checked off in their article settings?
"The trick is living without an answer."
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Re: article image (enlarge image)...use lightbox?

Post by marcus@localhorst »

anthony.abraira wrote:does anyone know if its possible to implement the lightbox feature to all articles that have the "enlarge image" option checked off in their article settings?
must correct this - it's not easy to solve, because of lack of the full sized picture information!
m
User avatar
metti
Posts: 81
Joined: Tue 28. Nov 2006, 07:34
Location: Merseburg
Contact:

Post by metti »

I did not read the all of this thread, but:
To get lightbox enhancement startet in phpwcms 1.30 and possibly in 1.28 / 1.29 when your phpwcms root is not your site root it is necessary to change the code of lightbox.php beginning at line 44:

Code: Select all

    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".$phpwcms['templates']."inc_app/lightbox/js/prototype.js\"></script>\n";
    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".$phpwcms['templates']."inc_app/lightbox/js/scriptaculous.js?load=effects\"></script>\n";
    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".$phpwcms['templates']."inc_app/lightbox/js/lightbox.js\"></script>\n";
    $block["htmlhead"] .="<link href=\"".$phpwcms['templates']."/inc_app/lightbox/css/lightbox.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
has to look like this:

Code: Select all

    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".ltrim($phpwcms['templates'], "/")."inc_app/lightbox/js/prototype.js\"></script>\n";
    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".ltrim($phpwcms['templates'], "/")."inc_app/lightbox/js/scriptaculous.js?load=effects\"></script>\n";
    $block["htmlhead"] .="<script type=\"text/javascript\" src=\"".ltrim($phpwcms['templates'], "/")."inc_app/lightbox/js/lightbox.js\"></script>\n";
    $block["htmlhead"] .="<link href=\"".ltrim($phpwcms['templates'], "/")."/inc_app/lightbox/css/lightbox.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
There is just a slash at the begining of $phpwcms['templates'], that has to be trimed with ltrim().
Bye,
Metti
#GeorgeWBush { position:absolute; bottom:-6ft; }
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

I've update the install instructions (now in german too) and post a new package for lightbox 2.02 which run by default on fresh phpwcms 1.3.0 installations. If you have still a folder phpwcms_templates - then you need to change a little bit more ;-) but it is not so much.
SEE THE STARTPOSTING!
Test and report bugs.

best marcus
mckingtom
Posts: 5
Joined: Sat 4. Feb 2006, 02:46
Location: Bern
Contact:

Post by mckingtom »

It works for me on both 1.2.6DEV and 1.3.0. Very easy installation (on 1.2.6dev one needs to add the three lines mentioned in the installation guidelines in conf.template_default.inc)

Many thanks for this script!
splette
Posts: 23
Joined: Thu 9. Mar 2006, 18:26
Location: Heidelberg, Germany
Contact:

Post by splette »

yes, I can only agree. Very simple installation. Works like a charm. Thanks Marcus!
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Great job markus, and very easy to install... real "newbee-like"!

Now it only integrates into the html-head, if there is at least one image or more on the special page...

Would be a little bit better, if the inclusion works only, if the images have popup-marks.
Pages with small thumbs only - without any popup marks - do now render with the included code too! Do you think its possible....?


But nevertheless "good work man"!
cbraun75
Posts: 5
Joined: Fri 13. May 2005, 22:35
Contact:

Kann es sein dass man noch etwas einbinden muß?

Post by cbraun75 »

Nachdem ich es nach anleitung installiert habe und
In der config...

Code: Select all

$template_default['article']['imagelist_table_class']		= 'imagelisttable';
$template_default['article']['imagelist_table_bgcolor']		= '';
$template_default['article']['imagelist_bgcolor']			= '';
$template_default['article']['imagelist_align']				= '';
$template_default['article']['imagelist_valign']			= '';
$template_default['article']['imagelist_border']			= 0;
$template_default['article']['imagelist_class']				= 'imagelisttd';
$template_default['article']['imagelist_imgclass']			= 'imagelistimg';
$template_default['article']['imagelist_caption_class']		= 'imglistcaption';
eingetragen habe und nun mein Bild klicke passiert leider gar nichts.

Muß man noch etwas einbauen (Javascripts oder CSS?)?? Bekomme nur ein einfaches Fenster das sich öffnet. Habe Version 1.3.

Vielleicht kannst Du das auch noch in die Anleitung mitaufnehmen?
splette
Posts: 23
Joined: Thu 9. Mar 2006, 18:26
Location: Heidelberg, Germany
Contact:

Post by splette »

ausser dem Hochladen der Files und dem Eintrag in der config Datei muss man nichts weiter tun. Das sollte eigentlich funktionieren... :roll:
mochito
Posts: 35
Joined: Fri 9. Jul 2004, 12:51
Contact:

Post by mochito »

Hi,

hatte das gleiche Problem - wichtig scheint zu sein den Browser-Cache und CMS-Cache zu löschen, ein Reload reichte nicht aus.

Seit dem gehts...

cu, juergen
cbraun75
Posts: 5
Joined: Fri 13. May 2005, 22:35
Contact:

Problem gelöst

Post by cbraun75 »

Habe in der vorlage Datei die javascript funktionen eingebunden und das CSS file unter Vorlage Header. Jetzt klappt es auch. Das wäre vielleicht nicht schlecht noch in die Anleitung zu schreiben ...

Trotzdem Danke für die Beantwortung.
Post Reply