Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Threads in Specific Forums
#1

I'm wondering if there is a way to replace the "Post Thread" button in a certain forum section with a different one such as "Add Content" that would bring up an editor different than the one used everywhere else on the forum. For example, in every other section of my forum people can click "Post Thread" and create their thread like normal using an editor like this one that I'm typing in now.  But in a certain section they would see "Add Content" and when that is clicked they would have a more form-like editor that would need to be filled out.  The threads (or content) within that certain section would be viewed the same way as threads everywhere else and people would still be able to post replies as normal.

Is this possible? I'm not sure of a way to do something like this without affecting all forum sections and the editors that all sections use.

The way I imagine I'd do this is to create a new php file that would follow the same format as newthread.php and have it only be valid in the fid's that I choose.  It would call my new editor instead of the one being used by the rest of the forum as well.


EDIT:  After some trial and error, I changed the way I was going about this.  I've made a few new templates, added some lines to some language files, edited the forumdisplay.php, and edited the newthread.php file.  Now I have a new button for certain sections and they lead to newthread.php still.  The page looks slightly different though due to a few 'if' statements within newthread.php which make it use a new template within these certain forum sections. 

I'm still working on a new form to fill out instead of using the editor which is used throughout the rest of the forum.
Reply
#2

I don't understand if you still need help Tongue
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#3

(10-16-2014, 09:13 PM)Pirata Nervo Wrote: I don't understand if you still need help Tongue

Hah, me either to be honest!

Here's a question for you, Pirata.  How would I go about adding new boxes to be filled out in newthread.php? 

For example, let's say when a person clicks Post Thread they not only see the normal editor but they see additional blanks to fill out.  Some would need to be required while others optional.  It would be similar to how "Thread Subject" is with the words on the left and a blank box to the right.  So I could have others like Content Title, Download Link, etc.

--------------You can ignore everything below this line in regards to answering my question-------------
I've already made a few changes to newthread.php and a new template which makes it so when a person is creating a thread in a certain forum section they see different options than what they would see on the rest of the forum.  For example, here I see "Post Options" below where I am typing.  This includes the option to include my signature and the option to disable smilies.  Well I replaced both of those for two different options in just the forum sections I wanted.  Now I need to make the functions actually work since I haven't written them yet.  I'll probably have to talk to you about them later.
Reply
#4

That's not very easy. It requires some work actually Tongue You need to edit the templates to add those new fields then hook to the insert and validation (not sure if validation has hooks; if not, you have to hook to a hook before the data is inserted) methods of the post datahandler.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#5

(10-17-2014, 06:47 AM)Pirata Nervo Wrote: That's not very easy. It requires some work actually Tongue You need to edit the templates to add those new fields then hook to the insert and validation (not sure if validation has hooks; if not, you have to hook to a hook before the data is inserted) methods of the post datahandler.

Thanks, I was asking around and someone mentioned this to me: http://mybbhacks.zingaburga.com/showthread.php?tid=289

I might try to use it as a reference.  I'm attempting to do all of this by making core changes myself instead of using a plugin. 
Reply
#6

Yes, XThreads is able to do it and you don't have to do much :p
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply




Users browsing this thread: 1 Guest(s)