News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Where does the posting go on?

Started by MLM, February 27, 2011, 04:14:35 PM

Previous topic - Next topic

ascaland

Quote from: MLM on February 28, 2011, 09:30:47 PM
Quote from: Project Evolution on February 28, 2011, 09:26:42 PM
So the code is outside of any function?

Correct

It shouldnt be there. Because now everytime you include the Subs-Post.php file its also going to be executing that code. And honestly I have no idea how the error handling can even work if $post_errors is no where to be found in the entire file.

MLM

Quote from: Project Evolution on February 28, 2011, 09:33:27 PM
It shouldnt be there. Because now everytime you include the Subs-Post.php file its also going to be executing that code. And honestly I have no idea how the error handling can even work if $post_errors is no where to be found in the entire file.

lol it does.. I will add to createPost() since i get what you are getting at and it also has the $topicOptions['id'] variable in it so hopefully it might work lol. I will report back soon!

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

MLM

No luck, tried adding to end of createPost() which makes it not run at all..

Also tried adding just above "// We need to know if the topic is approved. If we're told that's great - if not find out." right under the variable stuffs that go on but same effect as having it out..

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

MLM

My question still remains on how to get the topic id that is being posted. I have seen the answer on the first page but it doesn't work (Arantor). I have tried globalizing the the $topicOptions['id']...

id_topic in the _messages db is not auto incrementing so how do i get that number...

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

ascaland

Now im going to take a gamble. Find this in createPost(),
// They've posted, so they can make the view count go up one if they really want. (this is to keep views >= replies...)
$_SESSION['last_read_topic'] = 0;


Add your code above that.

MLM

YAAAAAAAAAAAAAAAAAAY!  ;D

Thank you so much  Project Evolution - Working perfectly even not posting if the topic isnt made.

Your support much much apreciated. Also thanks to Arantor!

TOPIC SOLVED!

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

ascaland

Phew, thank goodness... I was starting to get worried.

Advertisement: