473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

phpNuke - posting stories automatically

Hi

I'm customising phpNuke as an intranet application. The client would
like the option of letting users post news stories without
administrators' approval, so I've added a function to the theme.

It just inserts into nuke_stories the contents of nuke_queue, then
empties the latter.

I know it's rough and ready. Are there any database integrity issues
I've overlooked?

John


function postStoryAutomatically()
{
global $prefix, $db;
$sql = "INSERT INTO ".$prefix."_stories
(sid,catid,aid,title,time,hometext,bodytext,commen ts,counter,topic,informant,notes,ihome,alanguage,a comm,haspoll,pollID,score,ratings)
SELECT NULL, 0, 'Administrator', subject, timestamp, story, storyext,
'0', '0', topic, uname, '', '0', '', '0', '0', '0', '0', '0' FROM
".$prefix."_queue ";
$result = $db->sql_query($sql);

$sql = "DELETE FROM ".$prefix."_queue ";
$result = $db->sql_query($sql);
}
Jul 16 '05 #1
0 1873

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Keegan Alex | last post by:
Hi folks... I just installed phpnuke, and it's a great program. One problem is the Splatt forum really stinks. I'd LOVE to replace it with phpBB, but I'm not sure how. Can someone tell me if...
2
by: Keegan Alex | last post by:
Hi folks, I downloaded PHP-Nuke 6.7, and after reading the INSTALL file, it looks very simple... but either i'm reading them wrong or they're very flawed. First, it says: Untar the package...
0
by: Mark Boyden | last post by:
There have been several messages on newsgroups about problems with phpNUKE related to a post-installation error of: Fatal error: Call to undefined function: message_die() in...
0
by: cjescudero | last post by:
Hello: I am going to develop a web site to manage a conference, i.e.: - Submission of presentations - Registration of assistants - Hotel booking - … I have experience in programming...
4
by: PjH | last post by:
Newbie alert, here, so I apologise in advance. I have a website hosted with one company, under one domain, that needs to be moved to another host, and under another domain name. I've tried...
1
by: Leave Me Alone | last post by:
Hey folks... I have a standalone phpBB forums and just recently installed PHPNuke on my website. I know phpnuke comes with it's own version of phpBB. How can I make it possible for members who...
2
by: anon | last post by:
I copied over the phpnuke html files (latest version from sourceforge), created a mysql DB, added the settinsg to the config file. Anything else I need to do? When I run admin.php, I get a...
0
by: Stephan Deibel | last post by:
Hi, O'Reilly Associates has agreed to print a second volume of Python Success Stories and I am looking for contributors of new stories. This booklet will showcase Python in the context of a...
0
by: Stephan Deibel | last post by:
Hi, O'Reilly Associates is going to be printing volume III of the Python Success Stories series in June and I'm looking for submissions of new stories. The stories have been quite valuable...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.