5 of 11
5
Multi Relation
Posted: 05 September 2007 05:19 PM   [ Ignore ]   [ # 73 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  194
Joined  09-14-2004

—never mind… damn where’s the entry delete button?

 Signature 

{ say it once, say it twice, lealea says it’s nice }
{ member, professionals network }

Profile
 
 
Posted: 06 September 2007 02:18 PM   [ Ignore ]   [ # 74 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  194
Joined  09-14-2004

On second thought, there IS a problem.

{ if no_related_entries } does not parse with your extension. :( Thoughts?

 Signature 

{ say it once, say it twice, lealea says it’s nice }
{ member, professionals network }

Profile
 
 
Posted: 16 September 2007 10:01 AM   [ Ignore ]   [ # 75 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  130
Joined  03-29-2006
lealea - 06 September 2007 02:18 PM

On second thought, there IS a problem.

{ if no_related_entries } does not parse with your extension. :( Thoughts?

I was just coming here to see if there was a solution to this yet. { if no_related_entries } does not parse for us either.

On another note, once you’ve clicked and made a selection, or submitted an entry with a selection it isn’t possible to de-select and submit with no value selected.

In our case we are using about 15 multi-relational fields, all are not required. If we accidentally submit an entry with a selection in one of the relational fields and later change our mind, or need to update that field to remove a previously selected value—at this point it seems that is not possible.

 Signature 

Adam Stacoviak
Handcrafted

Profile
 
 
Posted: 17 September 2007 06:54 AM   [ Ignore ]   [ # 76 ]  
Grad Student
Avatar
Rank
Total Posts:  58
Joined  02-02-2006

@Image202

I believe you can already unselect entries. If you only have one entry selected (and if you have multiple, click on one to unselect the rest), then hold ctrl (command on mac) and click on that one selection to unselect it.

I hope that helps.

Profile
 
 
Posted: 17 September 2007 07:30 AM   [ Ignore ]   [ # 77 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  130
Joined  03-29-2006

@Jacob

You’re absolutely right. Good looking out!

 Signature 

Adam Stacoviak
Handcrafted

Profile
 
 
Posted: 29 September 2007 05:29 PM   [ Ignore ]   [ # 78 ]  
Summer Student
Total Posts:  3
Joined  05-22-2007

Has anyone gotten {switch} to work within the multi-relationship output block? i need to assign classes for alternating row colours but {related_entries} seems to output only the first class in {switch} for every line of the related items.

Profile
 
 
Posted: 02 October 2007 01:07 PM   [ Ignore ]   [ # 79 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@jonathanpoh - Unfortunately the template parsing is handled by EE and I don’t have too much access to that. I’m not sure how feasible it is to add a {switch} variable without a lot of hacking.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 02 October 2007 01:34 PM   [ Ignore ]   [ # 80 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32856
Joined  05-14-2004

You might search for the Switchplus plugin; I am not sure how this will interact with the multi relation extension, but it may work.  I don’t have a direct link but searching for “switchplus” should locate it.

 Signature 
Profile
MSG
 
 
Posted: 03 October 2007 05:41 AM   [ Ignore ]   [ # 81 ]  
Summer Student
Total Posts:  3
Joined  05-22-2007

Thanks! I’ll look for that plugin and see if it works. Cheers

Profile
 
 
Posted: 07 October 2007 01:10 AM   [ Ignore ]   [ # 82 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  03-08-2006

As expected I too got the {REL[31][field-name]VbgUKbQdREL} error. So, off I went to the mod.weblog.php page to include the extra php lines. But lo, I couldn’t find the comment line:

// 'weblog_entries_tagdata' hook.

I’m currently on v 1.6.0 build 20070708 and slightly baffled. Am I missing something? Can someone provide me with the precise line number where I should insert the fix? Or has the mod.weblog file been altered since this post and subsequent fix were posted?

BTW Mark, your EE plugins, ext’s and modules are emphatically brilliant: the dog’s appendages.

 Signature 

Seb Neerman

Profile
 
 
Posted: 10 October 2007 02:26 AM   [ Ignore ]   [ # 83 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  491
Joined  09-16-2004

Can anyone tell me how to increase the height of the multiselect beyond 6 rows?  There’s a line in the HTML source:

<select class="multiselect" style="width: 45%;" multiple="multiple" size="6" name="field_id_15[]">

but I simply cannot find how to change the ‘size=“6”’ bit anywhere!  If I change it locally in Firebug it works a treat, so if I could only find that darned 6 somewhere in the system…

Cheers smile

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 10 October 2007 02:45 AM   [ Ignore ]   [ # 84 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  03-08-2006

In the custom field creation or editing page (Admin > Weblog Admin >Custom Weblog Fields > Group/Field) there’s the option right below “Field Type”: Textarea Rows.

 Signature 

Seb Neerman

Profile
 
 
Posted: 10 October 2007 03:01 AM   [ Ignore ]   [ # 85 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  491
Joined  09-16-2004

Oh. My. Word.

I just cannot believe I missed that!  Thanks so much.  I’ve been doing quite a bit of hacking over the last few days and had forgotten that some things can still be administrated from the CP :\

*red faced*

Thanks again!

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 16 October 2007 10:15 AM   [ Ignore ]   [ # 86 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  03-08-2006

Hello all,

I posted a request for help a few posts ago… Now I’ve got a lengthier explanation of my conundrum.

I’m running version 1.6.0 - build 20070918 on a php4 server.

I have 3 weblogs that I’m trying to link to each other with mark hout’s multi-relation (106) extension. The weblogs are:
- Artists
- Events
- Press

The Press weblog has 2 custom multi-relation fields {news-artist-relationship} {news-event-relationship} where publishers can select which Artists and Events to create a relationship from the Press article.

The Events weblog has 1 custom multi-relation field {event-artist-relationship} where publishers can select which Artist to associate to the event.

In the Artist’s entry template I’ve placed 2 reverse relationship calls: one links it to any Press articles about the Artist, the other to any relative Events. It works a treat.

{exp:weblog:entries weblog="artists|events|news" orderby="date" sort="asc" disable="member_data|trackbacks"}
{if weblog_id
== '2'}

<span class="artist-born">{artist-born-lives}</span>
{artist-image}
<span class="introtext">{artist-intro}</span>
{artist-biog}
{artist
-website}


<h4>Artist's Press Coverage</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There has been no press coverage about the artist.</li>{/if}
{if news-artist-relationship}<li><a href="{title_permalink=news/press-article}">{title}</a></li>{/if}
{/reverse_related_entries}
</ul>

<h4>Come and see the Exhibition</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There are no exhibitions listed yet.</li>{/if}
{if event-artist-relationship}<li><a href="{title_permalink=events/exhibitions}"><span class="entrydate">{entry_date format='
%F %d %Y '}</span>{title}</a></li>{/if}
{/reverse_related_entries}
</ul>

{/if}
{/exp:weblog:entries}

In the Events entry template, I placed 1 reverse entry call for any Press Articles associated to the event and 1 related entry call to display the Artists related to the event.


{exp:weblog:entries weblog="artists|events|news" orderby="date" sort="asc" disable="member_data|trackbacks"}
{if weblog_id
== '4'}

<p class="event-dates"><span>Showing:</span>
<
abbr class="dtstart" title="{event-start-date format="%Y-%m-%d"}T{event-start-date format="%H:%i+%Z"}">{event-start-date format="%l %F %j, %Y"}</abbr> -
<
abbr class="dtend" title="{event-end-date format="%Y-%m-%d"}T{event-end-date format="%H:%i+%Z"}">{event-end-date format="%l %F %j, %Y"}</abbr></p>
<
p class="event-hours"><span>Visitng hours:</span> {event-opening-hours}</p>
<
p class="event-address"><span>Location:</span> <span class="location">{event-venue}</span></p>
<
p class="event-ical"><a href="http://suda.co.uk/projects/microformats/hcalendar/get-cal.php?uri=http://www.folkestonetriennial.org.uk/index.php/events/exhibitions/{url_title}">Add this event to your iCal</a></p>

<
span class="description"><!-- hCalendar description -->
<
span class="introtext">{event-intro}</span>
{event-image}
{event
-body}
</span><!-- end hCalendar description -->


<
h4>Event's Press Coverage</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There has been no press coverage about the artist.</li>{/if}
{if news-artist-relationship}<li><a href="{title_permalink=news/press-article}"><span class="entrydate">{entry_date format='
%F %d %Y '}</span>{title}</a></li>{/if}
{/reverse_related_entries}
</ul>

<h4>Read about the Artist</h4>
<ul>
{related_entries id="event-artist-relationship"}
<li><a href="{path=artists/biography}">{title}</a></li>
{/related_entries}
</ul>

{/if}
{/exp:weblog:entries}

The reverse entry works, but the related entry link doesn’t. Instead I get the dreaded {REL[45][event-artist-relationship]JqKzNzqQREL} borf. I’ve tried to modify the mod.weblog.php file as outlined in the original thread for the Mutli-Relationship but I couldn’t find any reference to the suggested line of code where to insert the fix.

In the Press entry template, where I want to display links to any Artists or Events that the article may refer to, I get the {REL[N}...} error twice over.

<h4>Read about the Artist</h4>
<
ul>
{related_entries id="news-artist-relationship"}
<li><a href="{title_permalink=events/exhibitions}">{title}</a></li>
{/related_entries}</ul>

<
h4>See the Exhibition</h4>
<
ul>
{related_entries id="news-event-relationship"}
<li><a href="{title_permalink=events/exhibitions}">{title}</a></li>
{/related_entries}
</ul>

Have I simply misunderstood how Related Entries work? Or am I clearly a victim of an incompatability issue with the Multi-relationship extension? Should I upgrade to PHP 5 to fix this? Or should I use the Multi-Drop-down-list instead or it’s Checkbox variant? Or should I head for Boyink’s suggestion and create different master relationship weblogs, which would take a while for me to get my head around, let alone my client?

BTW, all my entry templates are held in one page-article embed and generated accordingly as explained in Luke’s Jamboree article. Hence all the surrounding {if} statements and all-inclusive weblog tags.

Many thanks,
Seb

 Signature 

Seb Neerman

Profile
 
 
Posted: 26 October 2007 10:12 AM   [ Ignore ]   [ # 87 ]  
Grad Student
Avatar
Rank
Total Posts:  67
Joined  10-03-2005

Before I go on with my problem, let me first say thank you Mark for this extension.  It has been a huge help.

I’ve got an error which I think is related to the multi-relationship extension.  I’m running EE 1.6 Build 20070918 on PHP 4 (with the weblog_entries_tagdata hook fix).  I’ve got the following extentions: Custom Fields in EE Tags (v 2.1.8), File (v 2.1.2), Multi-Drop Down List (v 1.1.1), Clone Entries (v 1.1), and Multi-Relationship (v 1.0.6)

I have a weblog with a number of text fields and drop down lists.  It also has one Multi-Drop Down list and one Multi-Relationship list.  When I try to save the weblog, I get the following error if anything was already selected in the Multi-Relationship field:

MySQL ERROR:
Error Number: 1064
Description
: You have an error in your SQL syntax near 'exp_relationships FROM exp_relationships WHERE rel_id=5866' at line 1
Query
: DELETE exp_relationships FROM exp_relationships WHERE rel_id=5866

We had been running for a while with the Multi-Drop Down list without any problems. We are transitioning the information from the Multi-Drop Down list to the Multi-Relationship list to make some changes in how things work on the front end.  The problem only started after the Multi-Relationship field was added.  The problem does not occur if the field is blank or if it is the first time data is entered for the field.  We’ve used Multi-Relationship on other sites with the same set-up (with the exception of the extensions) without any problems.  I’m wondering if it could have something to do with one of the other extensions.

Any ideas?  Thanks for your help.

Profile
 
 
Posted: 30 October 2007 11:18 AM   [ Ignore ]   [ # 88 ]  
Grad Student
Avatar
Rank
Total Posts:  67
Joined  10-03-2005

Fixed my own problem.  The database at the host for this particular website didn’t like the syntax of the delete statement.  I changed the delete statement from

DELETE exp_relationships FROM exp_relationships WHERE rel_id=$data

to

DELETE FROM exp_relationships WHERE rel_id=$data

and everything worked fine.  Something about the extra table reference between the DELETE and FROM didn’t agree with the database.

If anyone knows any reason why this fix is a bad idea, please let me know.  Otherwise I think this problem is solved.

Profile
 
 
Posted: 30 October 2007 12:34 PM   [ Ignore ]   [ # 89 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  03-08-2006

Fixed my own problem too. For future reference, the fix to place after the ‘weblog_entries_tagdata’ hook in the mod.weblog.php file is on line 2924. For some annoying reason Textmate wasn’t finding it for me. Charming.

UPDATE: In version 1.6.4 it’s on line 3150.

 Signature 

Seb Neerman

Profile
 
 
Posted: 05 November 2007 05:35 PM   [ Ignore ]   [ # 90 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

Is it possible to list the selections in descending alphabetical order or even change the way it sorts?

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
   
5 of 11
5
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64905 Total Logged-in Users: 52
Total Topics: 81844 Total Anonymous Users: 31
Total Replies: 440034 Total Guests: 279
Total Posts: 521878    
Members ( View Memberlist )