Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#946 2015-05-19 12:54:33

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: smd_gallery: super-flexible gallery generator

Hi Bloke. I appreciate your plugins very (at what position should be “very”? :-) ). My comment was not against this plugin, just I never needed it. Thanks for all you good und helpful work.

Last edited by GugUser (2015-05-19 12:55:36)

Offline

#947 2018-02-25 18:52:47

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: smd_gallery: super-flexible gallery generator

Hi,

I’m trying to either display a gallery of 4 images cycling or a static image if one has been associated with the current article. That part works.

However I also want to display only images from a sub-category if we’re on a category page. I named the sub-categories ‘headers-norway’, ‘headers-iceland’, ‘headers-india’ etc. relating to the article categories ‘norway’, ‘iceland’, ‘india’ hoping I could call them using something like this:

<txp:smd_gallery category='headers-"<txp:category />"' sublevel="1" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
	</txp:smd_gallery>

… in an attempt to merge the literal 'headers-' with the output of <txp:category /> but no output is generated.

I’d be very grateful for any help :)

I pasted the full code below.

<txp:if_individual_article>
	<txp:if_custom_field name="header-image">
		<div id="header-image">
			<txp:article>
				<txp:image id='<txp:custom_field name="header-image" />' />
			</txp:article>
		</div>
	<txp:else />
		<txp:smd_gallery category='header-slideshows' sublevel="all" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	</txp:if_custom_field>
<txp:else />
	<txp:if_category>
		<txp:smd_gallery category='headers-"<txp:category />"' sublevel="1" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	<txp:else />
		<txp:smd_gallery category='header-slideshows' sublevel="all" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	</txp:if_category>
</txp:if_individual_article>

Offline

#948 2018-02-26 05:47:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,388
Website GitHub Mastodon Twitter

Re: smd_gallery: super-flexible gallery generator

Hi masa,

I normally use native tags and never used this plugin but try.

<txp:smd_gallery category='headers-<txp:category />' sublevel="1" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
		<img src="{url}" alt="{alt}" width="960" height="400" />
</txp:smd_gallery>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#949 2018-02-26 05:53:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,388
Website GitHub Mastodon Twitter

Re: smd_gallery: super-flexible gallery generator

some corrections in the full code too:

<txp:if_individual_article>
	<txp:if_custom_field name="header-image">
		<div id="header-image">
			<txp:article>
				<txp:image id='<txp:custom_field name="header-image" />' />
			</txp:article>
		</div>
	<txp:else />
		<txp:smd_gallery category="header-slideshows" sublevel="all" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	</txp:if_custom_field>
<txp:else />
	<txp:if_category>
		<txp:smd_gallery category='headers-<txp:category />' sublevel="1" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	<txp:else />
		<txp:smd_gallery category="header-slideshows" sublevel="all" limit="4" sort="random" wraptag="div" html_id="header-slideshow">
			<img src="{url}" alt="{alt}" width="960" height="400" />
		</txp:smd_gallery>
	</txp:if_category>
</txp:if_individual_article>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#950 2018-02-26 09:03:19

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: smd_gallery: super-flexible gallery generator

colak wrote #309434:

some corrections in the full code too:

Perfect, all working now! I knew it was something in my quote marks.

Thanks Yiannis!

Offline

#951 2018-05-15 14:42:20

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,205
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Julia wrote #311768:

Ich nehme deine ursprüngliche Anfrage aus dem anderen Thread hier auf:

Fatal error: Call to undefined function safe_create() in /homepages/6/d30691523/htdocs/textpattern/lib/txplib_misc.php(812) : eval()’d code on line 1479

dieser Fehler wird mir angezeigt

Das könnte sein, weil das Plugin nicht mit deine Version von Textpattern kompatibel ist. Da die Funktionalität mittlerweile in TXP eingebaut ist, ist der Anreiz der Plugin aktuell zu halten begrenzt.

<txp:smd_gallery id=“1,2,3” form=“article_img_c” />

Ich suche dringend das Plugin um Fotos wieder mit oben aufgeführten Link in Artikeln anzuzeigen.

Kannst Du bitte der Inhalt der Form article_img_c hier posten? Dann können wir Dir ein Variante mit den Txp-eigene Bordmitteln vorschlagen…


TXP Builders – finely-crafted code, design and txp

Offline

#952 2018-05-15 14:44:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Julia wrote #311768:

Call to undefined function safe_create()

This plugin doesn’t create any tables. That’s probably coming from somewhere else.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#953 2020-10-08 09:37:02

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: smd_gallery: super-flexible gallery generator

upgraded fancybox script to 3.3.5, after this my gallery not working like before – like here. it doesn’t apply the fancybox script to big image.
can anybody help me?

my code:

<txp:smd_gallery category="galerii" pageform="gallery_nav" pagepos="above,below" sort="date desc" limit="24" thumbsize=" ,100" grouptag="div" groupclass="pildid">
{grouptagstart}
<a class="fancybox" rel="fancy-{category}" href="{url}" title="{caption}">
{object}
</a>
{grouptagend}
</txp:smd_gallery>

Offline

#954 2020-10-09 04:14:12

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: smd_gallery: super-flexible gallery generator

It seems you have to change class="fancybox" to data-fancybox="gallery".

Offline

#955 2020-10-09 07:57:18

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: smd_gallery: super-flexible gallery generator

GugUser wrote #326269:

It seems you have to change class="fancybox" to data-fancybox="gallery".

yes! thank you GugUser!

Offline

#956 2021-06-14 23:55:25

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 177
Website

Re: smd_gallery: super-flexible gallery generator

Stef. I’m in the process of changing my servers, and PHP species. I’ve progressed from 5.4 to 7.1.

I’m seeing a message that indicates I might need to change the way my slideshow is organised.

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; smd_MLP has a deprecated constructor in /home/sa5c35vhsext/public_html/tramping/textpattern/plugins/smd_lib/smd_lib.php on line 5

This is looking ominous. I have a js slideshow from 2010 that works well enough, still, and I would like to maintain it. Mainly due to the work that would be involved, and that particular slideshow has a hidden caption that works very well.

Any suggestions here?

Thanks

Offline

#957 2021-06-15 00:28:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Easy fix. I’ll do it first thing tomorrow for ya. I think I’ve already done it in one version but it’s probably not published. If you want to do it yourself, inside the smd_lib pluign, right at the start in class smd_MLP where it says:

function smd_MLP {

Change it to:

function __construct {

and it’ll go away.

Last edited by Bloke (2021-06-15 00:29:36)


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#958 2021-06-15 09:55:47

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 177
Website

Re: smd_gallery: super-flexible gallery generator

Appreciate having an official release if that’s okay. I use it on a couple of sites.

Thanks, Stef.

Offline

#959 2021-06-15 13:10:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Actually, there’s already a release with the patch. Grab that and see how you go.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#960 2021-07-18 09:58:22

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: smd_gallery: super-flexible gallery generator

hi!

after upgrade to 4.8.7 i get error:

<b>Deprecated</b>:  Methods with the same name as their class will not be constructors in a future version of PHP; smd_MLP has a deprecated constructor in <b>/data02/virt34253/domeenid/www.arrakis.ee/htdocs/textpattern/plugins/smd_lib/smd_lib.php</b> on line <b>5</b><br />

PHP 7.4.2

Offline

Board footer

Powered by FluxBB