Scoop -- the swiss army chainsaw of content management
Front Page Everything News Code Help! Wishlist Project Scoop Sites Dev Notes Latest CVS changes Development Activities
Scoop Box Exchange - Show Box: submit_rdf 1.00

Author: Scoop Developers

Description:

Box Code:

return "Sorry, you don't have permission to submit a feed."

unless $S->have_perm('submit_rdf');

my $action = $S->{CGI}->param('action') || 'showform';

if ($action eq 'showform') {

return &disp_form();

} elsif ($action eq 'save') {

my $url = $S->{CGI}->param('url');

return ('Please fill in the URL field') unless $url;

# check to see if this RDF already exists

my $is_dup = 0;

my $channels = $S->rdf_channels;

foreach my $c (@{$channels}) {

$is_dup = 1 if $c->{rdf_link} eq $url;

}

return &disp_form('That RDF already exists, or has been submitted already.') if $is_dup;



my $do_fetch = $S->{UI}->{VARS}->{allow_rdf_fetch} ? 1 : 0;

my ($id, $res) = $S->rdf_add_channel($url, $do_fetch, $S->{NICK});

unless ($res) {

$S->rdf_remove_channel($id);

return &disp_form('Error adding RDF file: $res');

}

my $fetched_msg = qq|

%%norm_font%%Your RDF has been fetched. An admin will check it out as soon as possible%%norm_font_end%%|;

return $fetched_msg;

}



sub disp_form {

my $form = qq|

%%norm_font%% %%submit_rdf_message%% %%norm_font_end%%

<p>

<form action="%%rootdir%%/?" method="GET">

<input type="hidden" name="op" value="submitrdf">

<input type="hidden" name="action" value="save">

<table border=0 cellspacing=0 cellpadding=0>|;

$form .= qq|

<tr>

<td><FONT color="#FF0000">%%norm_font%%$_[0]%%norm_font_end%%</font></td>

</tr>| if $_[0];

$form .= qq|

<tr>

<td>%%norm_font%%URL of RDF file:%%norm_font_end%% <input type="text" name="url" size="50"></td>

</tr>

<tr>

<td><input type="submit" value="Submit"></td>

</tr>

</table>

</form>

|;

return $form;

}

Display: Sort:
https://www.aussiewritingreviews.com/ (none / 0) (#1)
by ScottWatkins on Sun Oct 14, 2018 at 10:35:55 AM PST

I don't think if this code is of any use to me. I will make sure to upload about it on https://www.aussiewritingreviews.com/. This way people whio can benefit from it can know about it.



inconvenient game (none / 0) (#2)
by maryKevaa on Mon Jan 18, 2021 at 11:05:07 PM PST

This is a smart thought, thank you for sharing. I will counsel cautiously prior to choosing to enlist! 1v1 lol



hi (none / 0) (#3)
by Nisha Knapp on Thu Oct 28, 2021 at 11:16:49 PM PST

You effectively manage your team and conduct specific task to have these incredible features and content. I would love to make this my guide. Thanks. 안전사설토토사이트추천



Menu
create account
faq
search
report bugs
Scoop Administrators Guide
Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Scoop::Ads
Almost there...

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest 1999 The Management

create account | faq | search