Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: bobdole2281 - heinäkuu 18, 2013, 02:53:54 IP

Otsikko: removePost()? What is the opposite of create post?
Kirjoitti: bobdole2281 - heinäkuu 18, 2013, 02:53:54 IP
I have been using createPost() to create threads in my custom HTML page. I'm finding I have to delete occasionally and am looking for a way to delete the thread as well.

Is there a remove post? It might not be called that, but a way to delete a specific thread. Any help would be greatly appreciated. Thanks!
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: vbgamer45 - heinäkuu 18, 2013, 03:16:12 IP
Deletemessage to delete a post
http://support.simplemachines.org/function_db/index.php?action=view_function;id=387

removetopic to delete a topic
http://support.simplemachines.org/function_db/index.php?action=view_function;id=389
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: bobdole2281 - elokuu 05, 2013, 02:11:40 IP
Thanks! I am trying to delete my thread with topic 1294.

This code isn't working, can anyone help??? :)

$topic = 1294;
removeTopics ($topics[, false $decreasePostCount[, true $ignoreRecycling]]);





Here was the error Parse error: syntax error, unexpected ',', expecting ']' in /home/content/28/10289928/html/marveldcforum/testtest.php on line 182.
Lainaa(Line 182 is the code "removeTopics....")
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: vbgamer45 - elokuu 05, 2013, 02:18:57 IP
Do
removeTopics ($topic, false, true);
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: bobdole2281 - elokuu 05, 2013, 02:58:20 IP
What do I need to call before it? I seem to have forgotten. I am already including('SII.php')

Getting this error:
Fatal error: Call to undefined function removeTopics() in /home/content/28/10289928/html/marveldcforum/testtest.php on line 184

Or perhaps I am not doing $topic variable correctly.

My topic is
$topic = 1294.0;
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: vbgamer45 - elokuu 05, 2013, 03:09:30 IP
require_once($sourcedir . '/RemoveTopic.php');
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: bobdole2281 - elokuu 05, 2013, 03:15:53 IP
Thanks man, that was it. You are a lifesaver!
Otsikko: Re: removePost()? What is the opposite of create post?
Kirjoitti: vbgamer45 - elokuu 05, 2013, 03:53:33 IP
Glad to help.