Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1:
Syndicate Linking

 

 


jferry
User

Jul 16, 2002, 6:53 PM

Post #1 of 7 (3652 views)
Shortcut
Syndicate Linking Can't Post

We always use the Internet URL: Article Type when creating articles. Most are links to articles originally published elsewhere. When we use the Syndicate feature the links connect to sub pages on our web site vs. directly linking to the original article. Can we set up Syndicate to link directly to the original url?

jf


dlo_itools
Staff


Jul 17, 2002, 10:25 AM

Post #2 of 7 (3631 views)
Shortcut
Re: [jferry] Syndicate Linking [In reply to] Can't Post

To have Syndicate use the direct link in an URL article instead of pointing back to your website, you just need to make a simple change to one of the template files.

1. Use a text editor to open the file

cgi-bin/artman/templates/syndicate/syndicate.js

2. In the section

// This section of the script is published by Article Manager

go to

<!-- templatecell : row_link -->

The templatecell's in this section look similar. Make sure you are at the row_link templatecell!

3. Beneath you will see 2 lines for syndicate.article_url... The first one is for linking directly to the URL, and is commented out by default. The second is for linking back to your site. Just uncomment the first and comment out the second.

Before (linking to your site):

// syndicate.article_url[ syndicate.index ] = '$detail_link_je$';
syndicate.article_url[ syndicate.index ] = '$url_index_je$#$art_num_je$';

After (linking directing to URL):

syndicate.article_url[ syndicate.index ] = '$detail_link_je$';
// syndicate.article_url[ syndicate.index ] = '$url_index_je$#$art_num_je$';

4. Go back to your Article Manager Setup and do a Publish All. Your current and future URL articles in the syndicate contents will now point directly to the original URL.
/Dave Lo


jferry
User

Jul 18, 2002, 8:46 AM

Post #3 of 7 (3612 views)
Shortcut
Re: [dlo] Syndicate Linking [In reply to] Can't Post

Thanks for the simple changes to the script. They work just as you describe. Now for the ideal way we would prefer the syndicate feature to work.

We use the top headlines as our main news page. See http://www.circuitnet.com/news.htm. Mixed in with business and technology news are 2 categories called "message". These are paid messages that mix in with the other categories. It would be ideal if we could syndicate the articles including these messages as they appear on our news page.

The current syndicate setup allows for the selection of specific categories and elimination of others. Thus syndicators can eliminate these paid messages. Also if the "All Categories" is selected for the web feed, the articles are placed in order by date vs. in category order. If we could syndicate the news as it is on our news page we would not want to give syndicators the option of picking and choosing categories. Can we change the syndicate script to work this way?


dlo_itools
Staff


Jul 18, 2002, 12:37 PM

Post #4 of 7 (3603 views)
Shortcut
Re: [jferry] Syndicate Linking [In reply to] Can't Post

I haven't been able to find a universal way of doing this that would work on all browsers, but here are the things I tried. Javascript guru's are welcomed to hack at it some more.

The general idea is that the users won't be running syndicate.cgi to get the syndicate code. You will supply the code to them which is based on syndicate.cgi's output. The line that is changed is the one that used to call syndicate_0.js:

<!-- begin syndicated content -->
<script language="Javascript1.1"><!--

var syndicate = new Object;
...--> </script><!-- keep all the style definitions -->

<script language="Javascript1.1" src="http://yoursite.com/artman/publish/syndicate_news.js"></script>

The file syndicate_news.js is something that you create, and where the browser/javascript compatibility fun starts. What you put in this file are the selection of categories and other text that you want to syndicate. For example, say you only want categories 1 and 2 to be syndicated.

You can try putting this in syndicate_news.js

document.write('<h2>Category 1</h2>');
document.write('<script language="Javascript1.1" src="http://yoursite.com/artman/publish/syndicate_1.js"></script>');
document.write('<h2>Category 2</h2>');
document.write('<script language="Javascript1.1" src="http://yoursite.com/artman/publish/syndicate_2.js"></script>');

Opera does the right thing but IE/Netscape/Mozilla prints

category 1
cateogory 2
syndicate news 1...
syndicate news 2...

Hmmm, seems like the processing of document.written html/text and scripts are not done in order of appearance...

So I try putting everything at the same level:

document.write('<script language="Javascript1.1" src="http://hyperion/artman/publish/syndicate_news_cat1.js"></script>');
document.write('<script language="Javascript1.1" src="http://hyperion/artman/publish/syndicate_1.js"></script>');
document.write('<script language="Javascript1.1" src="http://hyperion/artman/publish/syndicate_news_cat2.js"></script>');
document.write('<script language="Javascript1.1" src="http://hyperion/artman/publish/syndicate_2.js"></script>');

where syndicate_news_catN.js are files that contain the line

document.write('<h2>Category N</h2>');

That worked in IE/Opera/Netscape, but Mozilla prints a blank page.

Hopefully there are enough ideas here to explore some more. If someone finds a good solution let us know! You'll be adorned with accolades...
/Dave Lo


jferry
User

Jul 19, 2002, 7:02 AM

Post #5 of 7 (3588 views)
Shortcut
Re: [dlo] Syndicate Linking [In reply to] Can't Post

Dave we're getting close. I hope you can assist with a few final issues.

1. When using the script you suggest in the second grouping, the categories headlines stack up at the very top of the syndicate feed vs. above each individual syndicated category.

2. The stacked categories we would like to syndicate do not include the same number of articles. We have Business News (4), Message (1), Technology News (4), Yesterdays Top Story (1), Message (1), and Feature Articles (4). Once a category is displayed that includes only 1 article, all that follow will only show one article.

Hope you can offer some guidance.

jferry


dlo_itools
Staff


Jul 19, 2002, 10:30 AM

Post #6 of 7 (3581 views)
Shortcut
Re: [jferry] Syndicate Linking [In reply to] Can't Post

>Categories stacking up

I could not duplicate this with the second grouping method, using IE6.0.2600, Opera 6.03, and Netscape 6.2.3. It does happen with the first grouping though. Might be a browser version issue.

>only 1 article displayed

Before calling syndicate_N.js, add a line that says

document.write('<script language="Javascript1.1" src="http://yoursite.com/artman/publish/syndicate_news_reset.js"></script>');

Where syndicate_news_reset.js is a file you create that contains

syndicate.max_articles = 0;

The more I delve into this, the more I feel that document.write in Javascript is really not meant for writing out more <script>'s. With the high inconsistency in results so far, I'm downgrading the solution presented here from workaround to kludge. Newer browsers and browser version may break something else. We've already seen that this works in Netscape 6 but not Mozilla 1, and both have the Mozilla 5.0 core. Hopefully future browers will have more stability in this area.
/Dave Lo


jferry
User

Jul 24, 2002, 12:59 PM

Post #7 of 7 (3546 views)
Shortcut
Re: [dlo] Syndicate Linking [In reply to] Can't Post

Must say I agree with your contention that the solution you offer is more of a kluge than a workaround.

Have another idea that might just as easily solve our dilemma. Can we modify the syndicate script so that only the "All Categories" Webfeed Content Category option is offered.

Jferry