Duplicate headlines and summaries on two sites

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
coopersred
Posts: 35
Joined: Thu 8. Apr 2004, 14:40

Duplicate headlines and summaries on two sites

Post by coopersred »

I’ve got a client who has a couple of sites I’ve set up with PHPWCMS.

They want me to be able to duplicate some headlines and summaries from one site on to the other.

Can anyone suggest a away of doing this automatically – would I have to use PHP code or Java script? I don't want to have to set it up manually each time.

Thanks in advance
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Seems like the RSS Replacement Tag was meant for this, maybe?
http://www.phpwcms-docu.de/system_tags.phtml

Code: Select all

[RSS all] Text [/RSS]
Use:   With this replacement tag you can offer your content as an RSS feed. 
Notation: [RSS all]RSS-Feed[/RSS] 
Result: RSS 
Remark: The following settings are possible:

[RSS all]RSS-Feed[/RSS]
shows the complete website as an RSS feed.

[RSS INT]RSS-Feed[/RSS]
replace INT with an ID of a structure level and only this will be shown as an RSS feed.

[RSS ALIAS]RSS-Feed[/RSS]
replace ALIAS with an existing alias of your website and only this level will be shown as an RSS feed.
 
Alternative: Instead of text you can also insert an image:

[RSS all]{IMAGE:rss_valid.gif}[/RSS]
coopersred
Posts: 35
Joined: Thu 8. Apr 2004, 14:40

Post by coopersred »

Thanks for the tip.

I've managed to get it to work for a list of articles within the same category. But that's not quite what I want.

Is there anyway, for example, to generate a list of related articles on one site use the Rep-Tag RELATED and then have just those article appear on the second site.

I suppose I'm looking for a way to syndicate content and not just articles.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Maybe look into trying the RSS ALIAS method:

-Create a page that has an alias ( http://www.mydomain.com/index.php?myFeed ) and whose makeup is the {RELATED:X or whatever...
-Then with the [RSS ALIAS]RSS-Feed[/RSS]
replace ALIAS with myFeed ( alias of that website page ) and only this level will be shown as an RSS feed.

-OR MAYBE-
http://www.phpwcms-docu.de/system_tags.phtml
( $phpwcms["allow_remote_URL"] must be set to "allowed" )
{PHP:my_external_PHP_script.php}
Use: This tag supports complete external php scripts, ending with the *.php suffix. Phpwcms buffers output to enable these scripts to execute. Very robust including connections to remote databases. See forum for details and usage.
Notation: {PHP:my_external_PHP_script.php}
Result: -
Remark: The file name including the necessary indication of path is to be entered. Longer PHP scripts should be merged if necessary within iframe within phpwcms.
-OR MAYBE-
Try "scraping" what is between the <BODY></BODY> tags of the other site's page ( formatted using template of ONLY the {RELATED:X or whatever...
{URL:http://www.phpwcms.de}
Use: The URL tag offers support for the inclusion of both external as well as internal (phpwcms) web pages. It uniquely outputs markup that is found within the < BODY > and </BODY > tags.
Notation: {URL:http://www.phpwcms.de}
-OR MAYBE-
Try using an Addon Rep Tag like here:
http://www.phpwcms.de/forum/viewtopic.php?t=7322
and THEN "call" -or- "scrape"

-OR-
Write a PHP script that "extracts" only the content that you want and then call it from the other website.

IFRAME usage may be helpful TOO! :wink:
Last edited by DeXXus on Fri 31. Mar 2006, 19:20, edited 1 time in total.
Post Reply