[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Delete all forum posts (vbulletin/php)

Posted on 2011-05-02
7
Medium Priority
?
2,288 Views
Last Modified: 2012-05-11
I am a user on a forum and now want to delete all posts I have made from that forum. I can manually goto each post, click edit, click delete, and delete the posts. However, this is not a pratical solution for a large number of posts (>5k).

I'm sure there must be a way using php to cycle through the posts if I have a list of the post/thread id's to systematically delete the posts.

The vbulletin forum code taken from the delete post bit looks like this:
<form class="vbform block" action="editpost.php?do=deletepost&amp;p=1387087" method="post">
	<h2 class="blockhead">Delete Post</h2>
	<div class="blockbody formcontrols">
		<h3 class="blocksubhead">Select the appropriate options and then click the <strong>Delete</strong> button.</h3>
		<div class="section">
			<div class="blockrow">
			<dl class="dep_group">
					<dt><label for="delete"><input type="checkbox" class="dep_ctrl" id="delete" name="dodelete" value="1" tabindex="1" /> Delete this post in the following manner:</label></dt>
					<dd id="delete_deps">
						<ul class="group checkradio">
							<li>
								<dl class="group dep_group floatcontainer">
									<dt><label for="deltype_soft"><input type="radio" id="deltype_soft" checked="checked" class="dep_ctrl" name="deletepost" value="delete" tabindex="1" /> Delete Message</label></dt>
									<dd id="deltype_soft_deps">
										<input type="text" name="reason" class="textbox primary" value="" tabindex="1" />
									</dd>
								</dl>
							</li>
						</ul>
					</dd>
				</dl>
			</div>
		</div>
	</div>
	<div class="blockfoot actionbuttons">
		<div class="group">
			<input type="submit" class="button" value="Delete Post" tabindex="1" />
		</div>
	</div>
	<input type="hidden" name="s" value="" />
	<input type="hidden" name="securitytoken" value="1303979356-07f41ff782fe86f8f02350cd2d1a73d620a65ee3" />
	<input type="hidden" name="p" value="1387087" />
	<input type="hidden" name="url" value="www.thewebsite.com/forums/showthread.php?127861" />
	<input type="hidden" name="do" value="deletepost" />
</form>

Open in new window


If I have both the thread id the post is in, and the post id itself for every post, can anyone think of a way to cycle through this list automatically deleting the posts by using the above code? Cheers :)

Ross
0
Comment
Question by:Ross
  • 4
  • 2
7 Comments
 
LVL 8

Expert Comment

by:vr6r
ID: 35507028
Is the forum yours / do you have access to the mysql database?
For a large number like that I would think the easiest way would be a simple mysql query to remove all posts that match your userID.  I would highly recommend doing a backup first though if this is even an option for you.
0
 
LVL 2

Author Comment

by:Ross
ID: 35507137
No I'm not - if I was it'd be easy like you say :)

I need a way to do this just with my regular forum rights. Any ideas?
0
 
LVL 8

Expert Comment

by:vr6r
ID: 35508711
not offhand, no.  Normal forum authentication and security will prevent you from carrying functions like that out.  All forums I know of will validate each of those requests by session / user authentication, which you wouldn't have since the script would not be running on the forum host server.

I would probably request assistance from a forum admin.  I know SMF for example has a standard admin option to remove a forum account along with all posts and threads associated with it.  Then if you still wanted an account there you could just re-create it.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:Ross
ID: 35508859
What about something like a vba action that fires a browser session to do it? That way we're already authenticated via the cookie? Can we pass the delete command in the URL on it's own?
0
 
LVL 12

Expert Comment

by:Mohamed Abowarda
ID: 35511018
Since you don't have access to the database, it won't be as simple as it could be.

Create PHP cURL script to access the forum and delete each post for you.
0
 
LVL 2

Accepted Solution

by:
Ross earned 0 total points
ID: 35831944
Paid for a coder to develop a tool to do this for me.
0
 
LVL 2

Author Closing Comment

by:Ross
ID: 35872669
solutions posted here didn't address my issue - went to private coder.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question