Page 1 of 1

Perl Coding for Not Including or Bypassing?

PostPosted: Fri Apr 13, 2007 11:13 pm
by ChrisPokorny
I've searched the Coranto forum archives for over an hour now, and can't seem to find a solution to my problem.

I have two XMS profiles: one that's intended for me to submit fully completed football player articles(Called "Draft Profiles"), and one that's intended for me to submit partially completed football player articles(Called "Draft Holders"). Both profiles use the exact same category names for their intended news articles.

Now, I have a profile that is supposed to include the latest article from the "Draft Profiles" XMS submission page. Here is the style for that profile:

<If: Field: XMS_Profile eq "Draft Profiles"><center><img src="<FilePath: CustomField_Draftimages>" alt="-" /><br />
<b><Field: CustomField_Name>, <Field: CustomField_College></b></center>
<div style="padding-left:10px;padding-right:6px;"><Snip 220: Field: CustomField_Positives>[<a href="<MaginotFile: draftprofiles>"><b>More</b></a>]</div>

My question is this: Is there some form of a Perl or If statement that I can add to the style above that would make sure ALL POSTS in "Draft Holders" are bypassed? In other words, if the style encounters an article from "Draft Holders" as the most recent article, it will instead display the most recent article from "Draft Profiles"?

Remember, since I'm using the same column names for both XMS profiles, I cannot simply change the settings in the profile.

Found my solution...

PostPosted: Fri Apr 13, 2007 11:50 pm
by ChrisPokorny
Heh...amazing what a little more research can get you...

I just solved my problem using the "Filter By Field 2.1" add-on, which I never knew existed until a few minutes ago. It worked like a charm.

However, for reference, if anybody knows of a way, I'd still like to know if it's possible to do what I originally asked via Perl coding. It may be useful for future things I have in mind.

PostPosted: Mon Apr 16, 2007 5:56 pm
by Lumberjack
XMS actually adds an extra filtering option in the setings for each profile, which allows you to filter by XMS profile. Now, you say you can't do this, but I don't understand why from what you've described there. Can you explain that a bit better?

PostPosted: Mon Apr 16, 2007 10:52 pm
by ChrisPokorny
Perhaps it is a bug. I'll list an example.

One Category: nflnews
Two Profiles: ProfileA and ProfileB.
Two XMS Submit Pages: XMS1 and XMS2.

I want ProfileA and ProfileB to each output the news from nflnews. However, I also have it set up where I can make a post to the category nflnews via XMS1 or XMS2. In ProfileA and ProfileB, I've set up the XMS restriction properly. However, since nflnews is selected in both profiles, this seems to override the XMS limitation I have set.