Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Fri May 04, 2007 7:00 am Reply with quote

I have a very tightly controlled site and want to bypass the approval of news submissions ... how?

Thanks, I searched the site but found nothing ...

Jay
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Fri May 04, 2007 8:41 am Reply with quote

This is actually something that was added in the 2.0 version of NSN News from NukeScripts.net. There have been some issues with this version, but nothing that should prevent it's use. If you have a test site, I'd suggest testing it before implementing it as it does require database changes.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Fri May 04, 2007 9:51 am Reply with quote

Hey, I saw your post, and was working on a solution for you.

I have a solution for Regular nuke, this is a simple Hack so to speak and file based so you need to set this up by the settings Provided.

Sorry Kguske, I just spent about an hour or so on this, Just didnt think it would take me this long lol.

Open modules/Submit_News/Index.php

Find:

$result = $db->sql_query("INSERT INTO ".$prefix."_queue VALUES (NULL, '$uid', '$name', '$subject', '$story', '$storyext', now(), '$topic', '$alanguage')");



Comment out by adding // in from of $result so it looks like //$result , then right above that line add:

///////////////////////////////////////////////////////////
//News Hack to allow anyone to post News--Begin//
///////////////////////////////////////////////////////////

$hometext = $story;
$bodytext = $storyext;
$author = $name;
//I'm not sure if this is even used anymore but if its not, it will create a situation where it is easy to delete all News posted by people other then admins.
// If this setting causes any issues, make $catid='0' and that should take care of any problems.
$catid = '1';

//These Settings below are for EVERY single time someone submits something.
//Enter admim username here that you want listed as entered in, same thing as approved by.
$aid = admin name;

//Do you want comments activated with these stories? 0=no, 1=yes. set to no by default
$acomm='0';
//Do you want them to publish in Home? 0=yes, 1=No. Set to yes by default.
$ihome='0';

$result = $db->sql_query("Insert into ".$prefix."_stories values (NULL, '$catid', '$aid', '$subject', now(), '$hometext', '$bodytext', '0', '0', '$topic', '$author', '$notes', '$ihome', '$alanguage', '$acomm', '0', '0', '0', '0', '')");
/////////////////////////////////////////////////////////
//News Hack to allow anyone to post News--End//
/////////////////////////////////////////////////////////

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp







PostPosted: Fri May 04, 2007 2:16 pm Reply with quote

Ok, because I forgot to add this note in my previous post, you can surround that with an If statement to help to prevent Spammers.

You could even add a captcha to prevent spammers as well.

But This will NOT prevent someone from throwing something on your site and distorting the view or exploiting your site, it is a very big Risk.

thanks Jaded for letting me know I forgot to throw this warning in there.
 
dad7732







PostPosted: Sun May 06, 2007 7:57 am Reply with quote

I opted to go with the latest NSN News module but still cannot find a way to bypass the approval function.

Thanks for all the suggestions thus far.

Jay
 
gregexp







PostPosted: Sun May 06, 2007 11:43 am Reply with quote

My hack will bypass the approval. Completely, but as I stated previously, Spammers will Get you, perhaps I can change the code it an if(is_user) function only allowing users to do it, but also you could make it only registered users can even view the module, that would be the easiest thing, now mind you that it will make it so that each news will be posted on Home Page.
 
dad7732







PostPosted: Sun May 06, 2007 12:00 pm Reply with quote

Posts are on the home page and only registered users can even see the news posts. So now what, will your hack work as posted above without further mod?

Thanks, Jay
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun May 06, 2007 3:34 pm Reply with quote

I sounds like this doesn't meet your "specs" but I will ask anyway in view of the risks that the hacks expose you to. Are you sure that it would not be sufficient to just put a subset of your users in as news admins. It just means adding them to the authors table and giving them administrative privileges over news only. I had a situation where I did this for the Board of Directors of a group I run the web site for. It's far from an ideal solution, I agree, but it doesn't expose you to spam risks. Anyone pretty much can get registered and, with the hack, you will have them posting news without any approval.

It would be great if we had Approve Membership built into Your Account AND the ability to assign privileges to groups AND an easy way to manage group memberships but we don't so it's choose your poison.
 
View user's profile Send private message Visit poster's website
dad7732







PostPosted: Sun May 06, 2007 4:03 pm Reply with quote

fkelly ..

This particular site and user-base is small enough that I can do that, yes.

Thanks, may be the best option in this case.

Jay
 
dad7732







PostPosted: Sun May 06, 2007 4:25 pm Reply with quote

fkelly ...

Well, that didn't work. Maybe I just don't have a clue. Run over the procedure once for me so I can see where I erred ... Thanks, Jay
 
kguske







PostPosted: Sun May 06, 2007 4:44 pm Reply with quote

Just to clarify, dad7732, are you using NSN News 2.0RC2? If so, I believe you must authorize who can submit without approval. There may be a way to allow anyone, and may also have integration with NSN Groups (i.e. anyone in a group can submit without approval). If not, those would be nice enhancements...
 
dad7732







PostPosted: Sun May 06, 2007 5:38 pm Reply with quote

On the test site I'm running NSN 2.0rc2 but on the production site, I'm not. I really would like to not have to install NSN on that site but it looks like we're headed in that direction. Thanks, Jay
 
fkelly







PostPosted: Sun May 06, 2007 6:23 pm Reply with quote

The procedure, if you are running standard Nuke news, is to go into admin, go into edit admins, add new admins for each user and give them access (or administrative control) over the news module. Then notify them. You'll have to give them each a password for admin (I used the same one to keep it simple). I also told them to go into your account, your home and set up a little icon to log them into admin with a link to admin.php. I believe their browser will log them in on visits subsequent to their first.

Then when they are logged in they just use NEW story in the admin block, instead of submit news.
 
dad7732







PostPosted: Mon May 07, 2007 9:15 pm Reply with quote

That works but for whatever reason I can't get an icon link in Home. Sad

Thanks, Jay
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©