![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| FeedFlare Hello, I created a feedflare for Feedburner to allow blogers and new site submit to my Pligg site. The flare look like this: PHP Code: The link http://myPliggSiteSample.com/submit.php?url=${link} seem to only work when the article is new. But if it was already entered into my Pligg users get this message: Duplicate article URL: Please double check the URL and make sure that the article has not been already published You can vote and comment on the existing article: [/quote] When I click on "You can vote and comment on the existing article: " I get an invalid page. How do I make it so if the article exist then they are redirected to the article page instead of getting this message? Can some one help me with this? Thanks |
| Sponsored Links |
|
Check out the New Templates at the Pligg Pro Shop.
|
| |||
| Ok, my thoughts would be that you need to create a page that will first look at the url attached, see if it is already posted, and if not, 301 to the story url. This may as well be done in submit.php. Let me think.... Code: //if url already exists, go to story page
$check_url = mysql_real_escape_string(strip_tags($_GET['url']));
$link_query = mysql_query("SELECT link_id FROM " . table_links . " WHERE link_url='$check_url' AND link_status!='discard'");
$link_rows = mysql_num_rows($link_query);
if($link_rows > 0) {
$link = mysql_fetch_array($link_query);
$id = $link['link_id'];
header('Location: story.php?id='.$id);
} ![]() Last edited by Simon : 05-19-2007 at 02:26 PM. |
| |||
| That did it ![]() Thank you for the help! |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |





Linear Mode
