You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 240 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - PHP Nuke 6.7 News submission/post problem [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Zeppo249
Nuke Soldier
Nuke Soldier


Joined: Jul 16, 2003
Posts: 15


PostPosted: Tue Aug 12, 2003 7:37 am Reply with quoteBack to top

http://www.ebow-squad.com/


My problem is that I can write and submit news. However, when I go to submissions to preview it and then post it nothing shows up on the front page of the site.

The only way that I've been able to get anything up in the news story is through myphpadmin.

Is there a fix for this?
Find all posts by Zeppo249View user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Tue Aug 12, 2003 7:40 am Reply with quoteBack to top

Check your autonews and stories database tables, do both have an associated field?

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
Zeppo249
Nuke Soldier
Nuke Soldier


Joined: Jul 16, 2003
Posts: 15


PostPosted: Tue Aug 12, 2003 8:17 am Reply with quoteBack to top

Autonews in myphpadmin
anid catid aid title time hometext bodytext topic informant notes ihome alanguage acomm

Stories in myphpadmin
sid catid aid title time hometext bodytext comments counter topic informant notes ihome alanguage acomm haspoll polllD score ratings
Find all posts by Zeppo249View user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Tue Aug 12, 2003 8:22 am Reply with quoteBack to top

Place the following in a file, save it as something like fixstory.php, upload it to where config.php and mainfile.php are then point your browser to it, delete once done:

Code:
<?php

include("mainfile.php");

// Stories Table Alteration
$db->sql_query("ALTER TABLE ".$prefix."_stories ADD associated TEXT NOT NULL");
$db->sql_query("ALTER TABLE ".$prefix."_autonews ADD associated TEXT NOT NULL");

echo "PHP-Nuke Update finished!<br><br>"
    ."You should now delete this upgrade file from your server.";

?>

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
Zeppo249
Nuke Soldier
Nuke Soldier


Joined: Jul 16, 2003
Posts: 15


PostPosted: Tue Aug 12, 2003 8:27 am Reply with quoteBack to top

Thanks
Find all posts by Zeppo249View user's profileSend private message
Moutsos
Nuke Cadet
Nuke Cadet


Joined: Aug 13, 2003
Posts: 3


PostPosted: Wed Aug 13, 2003 3:57 pm Reply with quoteBack to top

I have the same problem like Zeppo249.
I had look at associated field I got:

Autonews in myphpadmin
anid, catid, aid, title, time, hometext, bodytext, topic, informant, notes, ihome, alanguage, acomm, associated

Stories in myphpadmin
sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, ihome, alanguage, acomm, haspoll, polllD, score, ratings, associated

Still nothing show up at home page
Is there anything else I should check?
Thanks
Find all posts by MoutsosView user's profileSend private message
Zigster
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2003
Posts: 27


PostPosted: Thu Aug 14, 2003 5:37 am Reply with quoteBack to top

Still dosen't solve the problem for 6.8 thou.Any ideas as this is a major part of nuke which i can not use anymore
Find all posts by ZigsterView user's profileSend private messageVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Thu Aug 14, 2003 5:39 am Reply with quoteBack to top

Pase the "autonews" function for us from the mainfile.php please.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Zigster
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2003
Posts: 27


PostPosted: Thu Aug 14, 2003 5:42 am Reply with quoteBack to top

Still dosen't solve the problem for 6.8 thou.Any ideas as this is a major part of nuke which i can not use anymore
Find all posts by ZigsterView user's profileSend private messageVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Thu Aug 14, 2003 5:55 am Reply with quoteBack to top

Sorry, meant to say "paste" the code block of autonews for us here.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Zigster
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2003
Posts: 27


PostPosted: Thu Aug 14, 2003 6:20 am Reply with quoteBack to top

Sry for being stupid where do i find that and i will post it up for you,thanks
Find all posts by ZigsterView user's profileSend private messageVisit poster's website
Zigster
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2003
Posts: 27


PostPosted: Thu Aug 14, 2003 6:25 am Reply with quoteBack to top

function automated_news() {
global $prefix, $multilingual, $currentlang, $db;
if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */
} else {
$querylang = "";
}
$today = getdate();
$day = $today[mday];
if ($day < 10) {
$day = "0$day";
}
$month = $today[mon];
if ($month < 10) {
$month = "0$month";
}
$year = $today[year];
$hour = $today[hours];
$min = $today[minutes];
$sec = "00";
$sql = "SELECT anid, time FROM ".$prefix."_autonews $querylang";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$anid = $row[anid];
$time = $row[time];
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})Sad[0-9]{1,2})Sad[0-9]{1,2})", $time, $date);
if (($date[1] <= $year) AND ($date[2] <= $month) AND ($date[3] <= $day)) {
if (($date[4] < $hour) AND ($date[5] >= $min) OR ($date[4] <= $hour) AND ($date[5] <= $min)) {
$sql2 = "SELECT * FROM ".$prefix."_autonews WHERE anid='$anid'";
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2)) {
$title = stripslashes(FixQuotes($row2[title]));
$hometext = stripslashes(FixQuotes($row2[hometext]));
$bodytext = stripslashes(FixQuotes($row2[bodytext]));
$notes = stripslashes(FixQuotes($row2[notes]));
$sql = "INSERT INTO ".$prefix."_stories VALUES (NULL, '$row2[catid]', '$row2[aid]', '$title', '$row2[time]', '$hometext', '$bodytext', '0', '0', '$row2[topic]', '$row2[informant]', '$notes', '$row2[ihome]', '$row2[alanguage]', '$row2[acomm]', '0', '0', '0', '0', '$row2[associated]')";
$db->sql_query($sql);
$sql = "DELETE FROM ".$prefix."_autonews WHERE anid='$anid'";
$db->sql_query($sql);
}
}
}
}
}


Is that what u Need


Last edited by Zigster on Thu Aug 14, 2003 6:32 am; edited 1 time in total
Find all posts by ZigsterView user's profileSend private messageVisit poster's website
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Thu Aug 14, 2003 6:26 am Reply with quoteBack to top

In mainfile.php near the end

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Thu Aug 14, 2003 6:28 am Reply with quoteBack to top

Paste this function block:

function automated_news()

From your mainfile.php.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Zigster
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2003
Posts: 27


PostPosted: Thu Aug 14, 2003 6:38 am Reply with quoteBack to top

Code:
function automated_news() {
    global $prefix, $multilingual, $currentlang, $db;
    if ($multilingual == 1) {
        $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */
    } else {
        $querylang = "";
    }
    $today = getdate();
    $day = $today[mday];
    if ($day < 10) {
        $day = "0$day";
    }
    $month = $today[mon];
    if ($month < 10) {
        $month = "0$month";
    }
    $year = $today[year];
    $hour = $today[hours];
    $min = $today[minutes];
    $sec = "00";
    $sql = "SELECT anid, time FROM ".$prefix."_autonews $querylang";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
        $anid = $row[anid];
        $time = $row[time];
        ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $date);
        if (($date[1] <= $year) AND ($date[2] <= $month) AND ($date[3] <= $day)) {
            if (($date[4] < $hour) AND ($date[5] >= $min) OR ($date[4] <= $hour) AND ($date[5] <= $min)) {
                $sql2 = "SELECT * FROM ".$prefix."_autonews WHERE anid='$anid'";
                $result2 = $db->sql_query($sql2);
                while ($row2 = $db->sql_fetchrow($result2)) {
                    $title = stripslashes(FixQuotes($row2[title]));
                    $hometext = stripslashes(FixQuotes($row2[hometext]));
                    $bodytext = stripslashes(FixQuotes($row2[bodytext]));
                    $notes = stripslashes(FixQuotes($row2[notes]));
                    $sql = "INSERT INTO ".$prefix."_stories VALUES (NULL, '$row2[catid]', '$row2[aid]', '$title', '$row2[time]', '$hometext', '$bodytext', '0', '0', '$row2[topic]', '$row2[informant]', '$notes', '$row2[ihome]', '$row2[alanguage]', '$row2[acomm]', '0', '0', '0', '0', '$row2[associated]')";
                    $db->sql_query($sql);
                    $sql = "DELETE FROM ".$prefix."_autonews WHERE anid='$anid'";
                    $db->sql_query($sql);
                }
            }
        }
    }
}


This is the autonews block

Admin edit:When submitting code disable smilies and html.
Find all posts by ZigsterView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.052 Seconds - 142 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::