Форумы / Cotonti / Support / FAO Twiebie - Slimbox + Imagescaling plugin (siena)

12>>>

fraze
#1 30.06.2012 19:55

not quite sure whats up with this but:

  1. it wont install because the slimbox.install.php appears to be incorrect.  when the install runs you get an ajax error and instead of amending the IMG bbcodes it actually adds another IMG bbcode into the database that has all the sql expressions included
  2. i removed these from the file and ran the install which then worked.  however now whenever you go to any url of the site you get a simple 'Wrong URL' come up from the script and nothing else.

I can see you have this working on your own website so just wondered how it was working there?

Twiebie
#2 30.06.2012 21:03

The version on Cotonti is the wrong one.

I'll update that ASAP when I have time, sorry for the inconvenience.

fraze
#3 01.07.2012 07:38

no probs - it would just be cool to have :)

Twiebie
#4 03.07.2012 01:43
fraze
#5 03.07.2012 17:53

worked perfectly, thanks man :)

Kingsley
#6 13.07.2012 15:39

works like a charm.. can you link this to other parts? so an image from, let's say page avatar plugin, get's picked up by this plugin too?

 

Twiebie
#7 13.07.2012 19:55
It works with the class 'scale', so if you add class="scale" to those images it should work.
Kort
#8 13.07.2012 20:58

Why would you guys need to:

  1. Use outdated script?
  2. Use plugin and limit yourselves with just one class rather than including the script via theme resource file?

Any lightbox clone (like Fancybox, PrettyPhoto etc.) can be used via theme rc.php and configured via js.js. It's a routine thing giving you any class or rel, galleries, modal windows, flash, youtube videos & more, taking 10 minutes of work and definitely not worth the time you spend of the useless plugin.

SED.by - создание сайтов, разработка плагинов и тем для Котонти
Kingsley
#9 13.07.2012 23:01

1. coz it's easy

2. we're not all professionals like you. I have (mediockre) html/css knowledge and have to do with things like this. It gets the job done.

Twiebie
#10 13.07.2012 23:15
#34959 Kort:

definitely not worth the time you spend of the useless plugin.

If people are using it succesfully, and it does what they want it to do, it's not useless, is it.

fraze
#11 14.07.2012 09:23
#34959 Kort:

Why would you guys need to:

  1. Use outdated script?
  2. Use plugin and limit yourselves with just one class rather than including the script via theme resource file?

Any lightbox clone (like Fancybox, PrettyPhoto etc.) can be used via theme rc.php and configured via js.js. It's a routine thing giving you any class or rel, galleries, modal windows, flash, youtube videos & more, taking 10 minutes of work and definitely not worth the time you spend of the useless plugin.

 

tbh i'm not a coder and welcome any help from people in the community.  As long as someone uses it, it's not useless.

Maybe if it's so simple you'd consent to writing up some articles on how to do it?  I for one would really like to have a gallery based on this but don't know how to code it.

Отредактировано: fraze (14.07.2012 09:31, 11 лет назад)
Kort
#12 16.07.2012 06:48

Frankly, back in 2011 I was also convinced that a Fancybox plugin for Cotonti Genoa was a good idea. I made it wasting a lot of time to transfer the Fancybox options into the plugin config and coding all IF / ELSE statements. This quickly brought me to an understanding that a much easier way is to naturally integrate it via the skin and use options from within the init strings (see below for advantages). Except these, any project might require a different lightbox-clone, so making (and supporting, which is different from making!) each plugin is just nonsense and a huge waste of time. So for you, guys, two small tuts:

1. Fancybox Integration

1.1. Download at https://github.com/fancyapps/fancyBox

1.2. Copy contents of the source folder into themes/nemesis/js/fancybox/

1.3. Include the plugin in nemesis.rc.php:

cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/js/fancybox/jquery.fancybox.css');
cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/js/fancybox/jquery.fancybox.pack.js');

1.4. Initialize the plugin in themes/nemesis/js/js.js:

$(".fancybox").fancybox();

1.5. Add .fancybox class to any element you need like:

<a href="#" title="Lorem Ipsum" class="fancybox"><img src="#" alt="" /></a>

1.6. Find options for the init string here: http://fancyapps.com/fancybox/

2. PrettyPhoto Integration

2.1. Download at http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/

2.2. Unzip the package into themes/nemesis/js/prettyphoto/

2.3. Include:

cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/js/prettyphoto/css/prettyPhoto.css');
cot_rc_add_file($cfg['themes_dir'].'/'.$usr['theme'].'/js/prettyphoto/js/jquery.prettyPhoto.js');

2.4. Init (example):

$("a[rel^='prettyPhoto']").prettyPhoto({
	show_title: true,
	social_tools: 0
});

2.5. Use selectors (mavatar example):

<ul id="listGal">
<!-- BEGIN: PAGEMAVATAR_ROW -->
	<li<!-- IF {PAGE_SLIDER_MAVATARNUM} % 4 == 0 --> class="endItem"<!-- ENDIF -->><a href="{PAGE_SLIDER_MAVATAR}" rel="prettyPhoto[pp_gal]" title="{PAGE_SLIDER_MAVATARDESC}"><img src="datas/galleries/thumb_{PAGE_SLIDER_MAVATARFILE}" alt="" /></a></li>
<!-- END: PAGEMAVATAR_ROW -->
</ul>

2.6. Spice up with the options: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation/

Advantages of the non-plugin approach:

- no need for a plugin and no need for a plugin maker

- use any selector and any options for any selector

- modal windows, galleries etc.

- easy upgrade (just copy / overwrite source files)

- use CSS/JS consolidation capability

SED.by - создание сайтов, разработка плагинов и тем для Котонти
Отредактировано: Kort (16.07.2012 09:09, 11 лет назад)
pieter
#13 16.07.2012 08:29

Thx Kort,  can you put this into documentation?

... can we help you ...
fraze
#14 16.07.2012 08:52

That's awesome Kort, thank you.

Twiebie
#15 16.07.2012 13:35
#34968 pieter:

Thx Kort,  can you put this into documentation?

Indeed, before it gets lost in the forums.

12>>>