Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    New Pligger Requiem's Avatar
    Joined
    May 2010
    Posts
    14

    Http://example.com/[submit this only] or block sites?

    Hello,

    I'm wondering how difficult it would be to make it so we can only submit articles from a particular site? For example,

    Http://www.example.com/[submit this only]

    The part in the end is the only part that the person needs to submit, can we do that?

    If not, can we block all sites except for a single one?

    Thanks!

  2. #2
    New Pligger ThemesHowTo's Avatar
    Joined
    May 2010
    Posts
    11
    Maybe you should coded the template by adding the domain name at the submit code. And if someone trying to add other site it will rejected due not valid url.

  3. #3
    New Pligger Requiem's Avatar
    Joined
    May 2010
    Posts
    14
    Quote Originally Posted by ThemesHowTo View Post
    Maybe you should coded the template by adding the domain name at the submit code. And if someone trying to add other site it will rejected due not valid url.
    Ok, I'll give that a shot. Thanks

  4. #4
    New Pligger Requiem's Avatar
    Joined
    May 2010
    Posts
    14
    Can someone tell me what to re-write to only allow a single website to be submitted? I've been trying to alter the code, but I just can't seem to get it to work. No matter what I alter, it always allows other websites to be submitted. Any help is appreciated! I need to get this figured out before I buy a skin and plugins.

  5. #5
    Banned channelztv's Avatar
    Joined
    Mar 2007
    Posts
    147
    You could try in submit_step_1.tpl
    find <input type="text" name="url" id="url" value="http://" size="55" />
    Change to <input type="hidden" name="url" id="url" value="http://domain u want" size="55" />

  6. #6
    New Pligger Requiem's Avatar
    Joined
    May 2010
    Posts
    14
    Quote Originally Posted by channelztv View Post
    You could try in submit_step_1.tpl
    find <input type="text" name="url" id="url" value="http://" size="55" />
    Change to <input type="hidden" name="url" id="url" value="http://domain u want" size="55" />
    I just tried that, when I made it hidden it completely hid the text area where you would enter a link. I originally had my value set at the domain I wanted, but people (and I suppose bots) can erase it and type in the URL to whatever site they wanted.

    I wonder if there is a way to block *all* sites, except for the one that I allow? Perhaps that's an easier method?

  7. #7
    Banned channelztv's Avatar
    Joined
    Mar 2007
    Posts
    147
    Did you try removing "type" ?
    <input type="text" name="url" id="url" value="http://" size="55" />
    Like this?
    <input name="url" id="url" value="http://" size="55" />

  8. #8
    New Pligger Requiem's Avatar
    Joined
    May 2010
    Posts
    14
    Quote Originally Posted by channelztv View Post
    Did you try removing "type" ?
    <input type="text" name="url" id="url" value="http://" size="55" />
    Like this?
    <input name="url" id="url" value="http://" size="55" />
    Yup, just copied and pasted what you had in there (including adding the domain in the value), didn't work. It still shows up like it would normally with input type="text"

  9. #9
    Banned channelztv's Avatar
    Joined
    Mar 2007
    Posts
    147
    Try this
    <input type="radio" checked="checked" name="url" id="url" value="http://your site"
    /> http:// your site

    Ok i edited this (forgot URL id) the trailing http: // your site will put text by a checked radio button

  10. #10
    Pligg Founder Yankidank's Avatar
    Joined
    Dec 2005
    Location
    San Francisco, CA
    Posts
    5,063
    Site
    http://pligg.com/demo/
    Sorry to be a few days late to this discussion, but I have an idea that might work for you.

    Step 1
    Open up the submit_step_2.tpl template file. Put the following on line 1, replacing the domain name with the domain(s) that you want to only allow them to post.
    Code:
    {if $url_short neq "http://domain.com" || $url_short neq "http://www.domain.com"}
    Step 2
    At the bottom of the same submit_step_2.tpl template file, place the following. You can substitute the error message with your own HTML.
    Code:
    {else}
    Sorry, but you are trying to submit a domain that we do not accept. Please go back and try again.
    {/if}
    Result
    The end result is that users will only be able to submit stories to the domains that you put in that {if} statement. If they try to submit a domain other than the ones specified they will see the error message letting them know that they are not submitting a supported URL.

    I use a similar method to alter what data appears on the Cuteaholic.com submission pages. If they are posting a video URL it shows that the video will automatically embed itself. If they don't post a known video domain URL it will give them an upload field to attach an image to the post.
    The Facebook Module for Pligg CMS!
    Register, Login, and Submit Stories with Facebook. An absolute MUST HAVE for all Pligg sites!

Page 1 of 2 12 LastLast

Similar Threads

  1. Trouble with submit.php?url=http://example.com
    By alexxa in forum Questions & Comments
    Replies: 16
    Last Post: 10-07-2010, 03:09 AM
  2. Is it possible to submit not http:// ? but
    By Apskaties in forum Questions & Comments
    Replies: 1
    Last Post: 09-19-2008, 06:38 AM
  3. How can I block all sites apart from a select few?
    By zsection in forum Questions & Comments
    Replies: 0
    Last Post: 03-22-2008, 06:16 PM
  4. submit.php?http://myurl.com - not taking me to submit step 2
    By gragland in forum Questions & Comments
    Replies: 1
    Last Post: 08-24-2007, 02:10 PM
  5. Able to submit non-http links?
    By ryx18 in forum Questions & Comments
    Replies: 1
    Last Post: 01-23-2007, 09:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting