OK, there was definitely a typo in there - which I fixed. Replace version 1.1.2 with 1.1.3, which you can get from the MD Simple Relation page.
No, this thing works with .htaccess generator, because I’m using both on a site right now. I’ll bet you I uploaded the same file by mistake, but gave it a new version number.
I’ll update the download (again…whoops!), but if you want to do a quick fix, disable the extension, then look at line 25 of ext.md_simple_relation.php, which is probably reading:
if ( ! defined('LG_HG_version')){
And change it to:
if ( ! defined('MD_SR_version')){
then re-enable the extension. That should fix the issue.
The reason that issue exists is because I was using Leevi’s .htaccess Generator extension as a model when I was making updates to this extension, and that was a simple copy/paste error.
I updated the download at my site as well, which just adds the tweak outlined above. The package for the new version is called “ext.simple_relation_113a.zip”.
Glad that got is solved!
Great extension. Nice and simple, just what I need. But I’ve got one problem…
I’m trying to make this work with Leandro’s jQuery lighbox, but for some reason, the extension always returns 2 extra images. For example, if I’m trying to display the 5 most recent images, the lightbox thinks there’s 7 images (even though there’s only 5 on the page), causing the “Next” button to appear on the 5th (and last image), leading to a dead end.
Here’s what I’ve got on the entry page:
{embed="films/gallerylinks" gallery_category="{gallery}"}
And the embedded template:
{exp:gallery:entries gallery="gallery" category="{embed:gallery_category}" orderby="date" limit="4" dynamic="off"}
{entries}
{row}
<a href="http://{image_url}" title="{category}">http://www.mysite.com/utilities/phpthumb/phpThumb.php?src=/images/gallery/{custom_field_one}/{filename}&w=115&h=80&q=95&zc=1</a>
{/row}
{/entries}
{/exp:gallery:entries}
The lightbox is working perfectly on other parts of the site, so I assume there must be a conflict of sorts. Any help would be greatly appreciated.
Hi Ryan -
I’m just about to update my copy of ext.simple_relation.php to the latest version, and I see you’ve changed the name to ext.md_simple_relation.php.
Can you clarify what that might mean for upgrading? (I’ve used the previous version to set up a lot of relationships, and I don’t want to bork them 😊 )
As the extension now has a different name, I’m assuming I’ll have to de-install the first version and reinstall the second, which I fear may lose all my existing relationships. Or should I just rename the second file ext.simple_relation.php?
Looking forward to any advice, thanks.
Les, I would strongly suggest updating, for sure, as that old 1.0.2 version has a lot of old-school check for update stuff in it that will very often cause problems on the CP homepage.
Sorry about the name change, but I should have prefixed it with the ‘MD’ in the first place.
This is what I would do.
1) Make a quick backup of your DB. 1a) Note all the custom fields you have that are currently Simple Relation Fields.
2) Disable/uninstall Simple Relation.
3) Install/enable MD Simple Relation.
4) Go through your custom field groups setting the custom fields that were SR (and may now be showing as blank) to MD SR.
You should be good at this point. May take you a couple minutes, but should be relatively painless. Uninstalling the first version of the extension shouldn’t do anything to the data in the field - and those fields are only storing a simple number (which was all I wanted).
If you need any help, ping me.
Hi again. I was wondering if it’s possible to have reverse relationships for galleries? That is, I would like a link on the related gallery category back to the original entry.
Sorry, I was unsubscribed to this thread. You could do this with the query module. Get the gallery id, then use the query module to…ACTUALLY you could probably use a simple embedded template that has a weblog entries tag in it - and then just pass the gallery ID to the search parameter of the embedded weblog:entries tag through an embed variable.
I’ll bet that would work like magic. Did that make sense?
Thanks for the reply. I couldn’t get the embedded template method to work, presumably because the weblog search parameter only works with standard custom fields, but I’ve taken a stab at running a query.
{exp:query sql="SELECT entry_id FROM exp_weblog_data WHERE field_id_13 = 5"}
<span class="small"><a href="/films/{entry_id}/">« Return to title</a></span>
{/exp:query}
The only problem is that I’m not quite sure how to grab the particular category id.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.