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
Duplicate headlines and summaries on two sites
-
- Posts: 35
- Joined: Thu 8. Apr 2004, 14:40
Seems like the RSS Replacement Tag was meant for this, maybe?
http://www.phpwcms-docu.de/system_tags.phtml
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]
-
- Posts: 35
- Joined: Thu 8. Apr 2004, 14:40
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.
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.
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" )
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...
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!
-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" )
-OR MAYBE-{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.
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...
-OR MAYBE-{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}
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!
Last edited by DeXXus on Fri 31. Mar 2006, 19:20, edited 1 time in total.