Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » smd_slimbox

#589 2009-02-22 19:27:08

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Just for good measure, I removed the double instances of the thickbox and jquery jscript files (didn’t realize that I has called on them twice) but, as you predicted, that’s not it.

The image all the way at the bottom of the post (300.jpg) still works no problem but that’s still just using a <a> instead of a <txp:smd_slimbox />

you said using this method worked fine on your test server?

Offline

#590 2009-02-22 19:31:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: smd_slimbox

OMGChris wrote:

The image all the way at the bottom of the post (300.jpg) still works no problem but that’s still just using a <a> instead of a <txp:smd_slimbox />

Ah, hover over the two links. See the difference? The Nu image is www.omgchris.com and the one generated by Slimbox is omgchris.com (which is taken from your Admin->Preferences->Site URL). I bet thickbox is borking because it thinks the domain is different. Change your site pref to www.omgchris.com and try again.

Last edited by Bloke (2009-02-22 19:31:39)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#591 2009-02-22 19:49:38

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

I update the site url to www.omgchris.com and, sure enough, when you mouse over the image it now includes “www” but it’s still not grabbing the image

I did notice one thing, though.

Currently, my <a> tag for the Nu image has the src as /images/300.jpg. If i change that to http://www.omgchris.com/images/300.jpg, it does the same thing as the smd_slimbox ones

edit: nevermind, I made a typo. It still works when you use an absolute path

Last edited by OMGChris (2009-02-22 19:58:15)

Offline

#592 2009-02-22 20:23:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: smd_slimbox

OMGChris wrote:

it’s still not grabbing the image

Bugger. OK, comparing the two URLs side by side:

<a href="http://www.omgchris.com/images/412.jpg" rel="lightbox-smd" title="" class="thickbox"><img src="http://www.omgchris.com/images/412t.jpg" alt="" /></a>
<a href="http://www.omgchris.com/images/300.jpg" title="All Life Begins with Nu and ends with Nu.  This is the truth!  This is my belief!  ...at least for now" class="thickbox" ><img src="http://www.omgchris.com/images/300t.jpg" alt="Nu" /></a>

Ignoring the ‘title’ which I hope won’t affect anything, the only difference is the ‘rel’. So what I’m wondering now is this: if you use a rel attribute then thickbox expects there to be more than one image in the gallery. When it finds only one image in the gallery it gets confused. To prove this, try one of these methods:

  1. manually add rel="lightbox-smd" to the Nu image’s anchor tag and see if both images work
  2. temporarily hack the plugin: go down to the bottom of the code and look for where it says rel="' .$trigger.$grp. '" . Remove that bit of code and save the plugin, then see if both images work

Both methods should make a gallery of two images. If either (or both) of those methods fix it then I’ll have to make the plugin more clever so that you can turn off the ‘rel’ if you wish. Sorry this is such a chore. I’ve never known anyone use the plugin to display one image before, so that’s probably why this has never cropped up!

Last edited by Bloke (2009-02-22 20:25:08)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#593 2009-02-22 20:36:04

OMGChris
New Member
Registered: 2009-02-22
Posts: 7

Re: smd_slimbox

Bloke wrote:

  1. manually add rel="lightbox-smd" to the Nu image’s anchor tag and see if both images work
  2. temporarily hack the plugin: go down to the bottom of the code and look for where it says rel="' .$trigger.$grp. '" . Remove that bit of code and save the plugin, then see if both images work

Success! When I added rel="lightbox-smd" to Nu’s anchor tag, it did the same as the smd_slimbox tag. So I removed rel="' .$trigger.$grp. '" from the plugin and it worked like a charm.

Thanks so much for all the help. If my case is special, there’s really no need to alter the plugin to toggle rel="lightbox-smd" on or off :)

I would like to say that i think it’s fantastic how much dedication you put into your code, spending so much tim on the forums helping other out and everything. Cheers!

Last edited by OMGChris (2009-02-22 20:37:27)

Offline

#594 2009-02-22 21:02:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: smd_slimbox

OMGChris wrote:

Success!… If my case is special, there’s really no need to alter the plugin to toggle rel="lightbox-smd" on or off :)

Woohoo! Glad it’s working. There’s no question about it being a special case; it’s a bug. In order to support single-image Thickbox galleries, the plugin needs to be able to remove the rel attribute. And v0.33 does (compressed version).

Since a single-image thickbox is a special case, in order to remove the rel attribute (which is made up of both trigger and groupname) you must set both of those attributes to nothing, i.e. trigger="" groupname="". That’ll do the same as the hack.

Sorry it was such a bind trying to work this one out. Thanks for finding the bug.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#595 2009-03-29 19:24:46

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 782
Website

Re: smd_slimbox

I’ve migrated a TXP site to a new host. Everything is ok, except this error > Tag foutmelding <txp:smd_slimbox imageid="37" /> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66 at the top of all pages where I use smd_slimbox! What’s happening here?

Last edited by RedFox (2009-03-29 19:25:50)

Offline

#596 2009-03-29 19:40:39

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: smd_slimbox

Bloke, I can confirm that this notice is showing with in smd_gallery too


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#597 2009-03-30 07:32:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: smd_slimbox

RedFox & the_ghost

Hmmm, that’s in smd_lib, hence it affects both plugins. I changed the regular expression over to use the more “international” friendly pattern syntax but I guess that particular feature isn’t in the version of PHP you run.

Support for this syntax was added in PHP 4.4.0 (according to the regex page under Unicode character properties). What version are you running?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#598 2009-03-30 07:53:33

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 782
Website

Re: smd_slimbox

Bloke wrote:

Support for this syntax was added in PHP 4.4.0 (according to the regex page under Unicode character properties). What version are you running?

Textpattern versie: 4.0.7 (r3025)
Laatste update: 2008-11-28 21:50:24/2009-03-29 16:53:45
Document root: /var/www/html
$path_to_site: /var/www/html/txptogo
Pad naar textpattern: /var/www/html/txptogo/textpattern
Permanente link modus: title_only
tijdelijke bestanden map: /var/www/html/txptogo/textpattern/tmp
Site URL: www.redfoxwebdesign.nl/txptogo
PHP versie: 5.2.9
GD bibliotheek: bundled (2.0.34 compatible); ondersteunde bestandssoorten: GIF, JPG, PNG.
Lokale servertijd: 2009-03-30 09:47:24
MySQL: 4.1.22
Localisatie: nl_NL.UTF-8
Server: Apache/2.0.52 (Red Hat)
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Besturingssysteem van de server: Linux 2.6.9-78.0.8.ELsmp
Actieve plugins: rss_suparchive-0.18, bas_lightbox-0.5, wlk_qt-0.9.8, stm_article_order-0.2m, wet_quicklink-0.4.5, wet_peex-0.3, the_video-0.8, ign_password_protect-0.5b9, rah_autogrowing_textarea-0.2, bot_privs-0.1, smd_slimbox-0.32, smd_lib-0.34, adi_notes-0.3m, ebl-image-edit-1.0m, glx_hl_current-0.3, rah_time-0.1, rvm_if_this_article-0.1
Pre-flight controle: 
------------------------
Ontbrekende bestanden: /var/www/html/txptogo/textpattern/../rpc/index.php, /var/www/html/txptogo/textpattern/../rpc/TXP_RPCServer.php
------------------------
inhoud .htaccess bestand: 
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]
	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php
	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
------------------------

Offline

#599 2009-03-30 08:02:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: smd_slimbox

RedFox wrote:

PHP versie: 5.2.9

Well now I’m confused :-s

Erm… *shrug* I assume that --without-pcre-regex has not been used to copmile your version of PHP? Check your phpinfo().

Last edited by Bloke (2009-03-30 08:05:08)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#600 2009-03-30 08:05:21

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 782
Website

Re: smd_slimbox

Bloke

Did you see this?

Ontbrekende bestanden: /var/www/html/txptogo/textpattern/../rpc/index.php, /var/www/html/txptogo/textpattern/../rpc/TXP_RPCServer.php

Missing files!

Offline

  1. Index
  2. » Plugin support
  3. » smd_slimbox

Board footer

Powered by FluxBB