1
jdseymour
NewBB2 Posttonews.php modified for AMS

newBB has a feature for "Post to News". Since I changed to the Article Management System (AMS) the feature no longer worked.

The file responsible for this feature is "posttonews.php" located in the newBB root directory.

Anyway I got out my trusty NoteTab Pro and modified the file to work with the AMS module.

To use just upload the extracted file to the /modules/newBB root directory replacing the existing file and enjoy.

Please comment if there are any problems, I use it and it works fine on my system.

Note: I am no PHP programmer, but, am learning enough to accomplish a few simple task that I need.

With my wfdownloads you may have to click on the link after 3 seconds to get download. Never could get it to work automagically for me.

The download link is: posttonews.php

2
Mithrandir
Re: NewBB2 Posttonews.php modified for AMS

You have some errors in there.

1) $tags['STORY_URL'] = XOOPS_URL . '/modules/AMS/ticle.php?storyid=' . $story->storyid();
wrong URL, ticle.php doesn't exist - article.php does

2) You are triggering the same notification twice

3
jdseymour
Re: NewBB2 Posttonews.php modified for AMS

Thanks, I was wondering about that section of the code. Will fix it.

4
Anonymous
Re: NewBB2 Posttonews.php modified for AMS
  • 2005/1/10 12:22

  • Anonymous

  • Posts: 0

  • Since:


Can you add your code to the Patchtracker on dev.xoops.org?

Patchtracker

For the next Version we want to make it selectable for more news modules, so you can choice which Module you use.

Thanks in advance

5
jdseymour
Re: NewBB2 Posttonews.php modified for AMS

Yes Predator I will be happy to.

OK, I changed ticle.php to article.php still getting an error on line 92. In my editor it shows as line 93.

Any suggestions?

6
m0nty
Re: NewBB2 Posttonews.php modified for AMS
  • 2005/1/10 13:19

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


whats the error message say?

7
Mithrandir
Re: NewBB2 Posttonews.php modified for AMS

$tags['STORY_NAME'] = $title;

$title is not set at that point.

8
jdseymour
Re: NewBB2 Posttonews.php modified for AMS

I am currently comparing the file to /AMS/submit.php

$title; is set the same way there on line 318.

So the variable should be defined. Am I on the right track or beating my head against the wall?

9
Mithrandir
Re: NewBB2 Posttonews.php modified for AMS

If you don't define it, it isn't defined. Unless you run with register globals on.

The reason why the AMS submit page has it that way is that there is (or rather - was. It is removed in next AMS version) this piece of code at the top:
foreach ( $_POST as $k => $v ) {
    ${
$k} = $v;
}

10
jdseymour
Re: NewBB2 Posttonews.php modified for AMS

My host will not turn off register globals, for compatibility reasons.

So when I hit the posttonews icon at the bottom of the forum with PHP debug going it takes me to the Send to NewStory page without errors. When I hit submit and am redirected to the AMS editor page I get and undefined variable $title on line 92.

So is this related, or I don't see the errors with register globals on?

Login

Who's Online

329 user(s) are online (199 user(s) are browsing Support Forums)


Members: 0


Guests: 329


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits