vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - [CMS] Use original thread for comments (https://vborg.vbsupport.ru/showthread.php?t=230417)

Carnage 12-16-2009 10:00 PM

[CMS] Use original thread for comments
 
1 Attachment(s)
As of 4.1.11 this functionality is included in vbulletin. So you no longer need this mod.

What does this do?
This is a really simple hack that sets the thread for article comments to be the original thread for any thread that is promoted to an article.

What can I use it for?
This mod has two major uses:

1. If you have a wealth of information in your forums and you want to promote it into articles, this mod allows you to retain the rest of the thread as comments in the cms while adding any new comments as replies to the thread; essentially allowing it to function as both a forum thread and a CMS article.

2. If you want to use multiple fourms for CMS comments. This is a fairly none obvious use case, but probably a popular one. If you have three sections in your cms (for example) and want each section to feed into its own forum, the current cms dosn't allow you to do this. With this mod installed, you can. Instead of creating your new article directly in the cms create it in the forum you wish to use for comments. Write your article as the first post of the thread and promote it to a cms article. Fill out the extra information needed (eg publish date) and save. Comments will be saved into the original thread, in the forum you created it in.

Installation Vb 4.0.1 and later
1. Import product

Uninstallation
1. Disable the plugin "set thread id"

Full uninstallation
1. Move threads that have been promoted to articles into the vbcms comments forum.
2. COPY the threads back to their original forums
3. Remove product

Steps 1 and 2 are needed to retain cache functions on the comments threads. Without them new comments will not appear on the article.

Changelog
  • 4.0-0.1 a2
    • Fixed bug causing original thread to be delete when the article was deleted
  • 4.0-0.1 a1
    • Initial release

Notes
  • I believe this is the first mod for the CMS (not including addon widgets/content types)
  • Removing this product entirly will cause issues with the cache on any articles using the original thread. Follow the uninstall steps to remove functionallity while retaining the ability to comment on these articles this mod has altered.
  • [S] Although its compatible with vbulletin 4.0 Rc 4, a bug in RC 4 and 4.0.0 Gold prevents it from acctually working. I have provided a replacement hooks_vbcms.xml file which corrects the issue in the interim.[/S] (fixed in vb4.0.1)
  • [s]Deleting an article will remove the associated original thread This is considered a bug in this product and will hopefully be fixed with the next release. [/s] (fixed)
  • The above bug has been fixed, however pending this request: http://www.vbulletin.com/forum/proje...?issueid=34188 Thread tags for the original thread will still be removed. There is /nothing/ I can do about that until the issue listed is resolved. (this has been marked as fixed in 4.0.2; will update further when i've tested that its fixed.)
  • [S]If you hard delete the original thread without first removing the article you will be affected by this bug: http://www.vbulletin.com/forum/proje...?issueid=34187 the fix I posted to that issue needs to be applied BEFORE deleting the original thread. After more research, this only becomes an issue if you promote a thread more than once. If you've done this, you can fix the error by clearing the CMS cache.[/S] (fixed in 4.0.1)

As of 4.1.11 this functionality is included in vbulletin. So you no longer need this mod.

buontaiviem 12-17-2009 09:27 PM

Got big problem. When del article then it also del thread on Forum. I lost some threads for it :(
And comment from article is error Unicode font :(

Carnage 12-17-2009 10:09 PM

Will fix the deleting problem asap; however there seems to be a lack of useful hooks for it.

Can you give me more details about the second problem?

mmcguire 12-17-2009 10:24 PM

Installed on my test forum and it works great. Thanks!!

RadioErewan 12-18-2009 08:05 AM

Would like to say "GREAT"!

buontaiviem 12-18-2009 09:35 AM

Quote:

Originally Posted by Carnage- (Post 1932554)
Will fix the deleting problem asap; however there seems to be a lack of useful hooks for it.

Can you give me more details about the second problem?

I got second problem when i tested at my site. Now i testing at localhost, it run fine.
I will try again at my site after you fixed deleting problem.

dihuta 12-18-2009 12:26 PM

Reserved for future use.
Thanks!

Carnage 12-18-2009 01:56 PM

I've made a reasonable attempt to fix the deleting problem which has proved sucessful on my dev board. However you will still lose some data (thread tags) pending the hook I used being moved to a more sensible place.

Read the notes section for the other minor known issues. (and their fixes)

shadowedsoul 12-18-2009 02:12 PM

This will be AMAZINGLY useful. It's honestly the way comments for promoted threads should act in the CMS.

Carnage 12-18-2009 04:08 PM

Quote:

This will be AMAZINGLY useful. It's honestly the way comments for promoted threads should act in the CMS.
I agree, which is why I made this mod. The only issue that I see is if you promote a post that isn't the first post in a thread - in that instance, the entire thread will be used for comments which might not be entirly relevant.

SillyAlien 12-18-2009 11:24 PM

MOTM candidate. Easily!

... and Thank You!

Sean James 12-23-2009 05:13 AM

Does this work with gold?

SpankMe 12-23-2009 05:57 AM

Just what I need. :) Looking forward to further development of this mod. Would like to see the article displaying the original post as well. That way when a member updates their post it will be reflected in the article as well.

Carnage 12-23-2009 05:45 PM

Quote:

Originally Posted by Griffin80 (Post 1936089)
Does this work with gold?

ive had no issues with gold so far; if you had this installed when you upgraded, you may need to upload the hooks_ file attached again as the vb upgrade will have over written it

BozzaJos 12-24-2009 03:12 PM

Hi Carnage!

It's so strange that this isn't a default option in vBulletin. My question is if step 1 and 2 are still needed with the gold release? If not, you might wanna update your first post.

Another question is if you can tell me how the development is going for this mod? Will there be some improvements soon and worth the waiting? It's always nice to be kept up-to-date.

I thank you for the time. All that's left to is that this is a great and must-have mod! Only reason why I don't just install it is because it's still in beta stage and since my vBulletin knowledge is pretty limited, I need fully tested products hehe. That's why I leave this reply. I hope you understand.

Keep up the good work!

Carnage 12-24-2009 05:40 PM

Quote:

My question is if step 1 and 2 are still needed with the gold release? If not, you might wanna update your first post.
Yes, unfortunatly, steps 1 and 2 are required with gold. The bug is listed as fixed for 4.0.1

Quote:

Another question is if you can tell me how the development is going for this mod? Will there be some improvements soon and worth the waiting? It's always nice to be kept up-to-date.
There aren't likely to be more features. Its a very simple mod, it does exactly what its meant to, nothing more. If people find bugs, i'll fix them, if vb updates break this mod, i'll get it working again. Other than that, i can't see much development thats needed.

Quote:

Only reason why I don't just install it is because it's still in beta stage and since my vBulletin knowledge is pretty limited, I need fully tested products hehe.
I think all of my mods are in beta stage; generally, my mods are used on my own sites, i release them as betas as I've no idea how they'll act in the wild... I'd say my betas are probably as good as most mods on the site; they may never leave beta if i don't get enough feedback on how well the work (as a comparison, most of googles apps are in beta, gmail was in beta for 5 years)

Booth 12-24-2009 06:14 PM

This really should be a default feature of vBulletin 4 - I suggested it months ago, grrrr!

BozzaJos 12-24-2009 08:20 PM

Thanks for the quick and detailed reply Carnage! Always fantastic to see such quality support...

I hope you don't mind that I ask a couple more things? I'm still a bit unclear how this mod actually works. Let me start by telling what my favorite method would be (within the possibilities of the CMS of course / hopefully). I would like to add articles on the CMS and promote threads on the Forum as an article. From what I know, the only possibility to have comments enabled in the CMS is to select 1 single section where the forum thread should be created. This is for me not very handy since I have many different sections and can't have all discussions placed in one single forum section. For that, I did have a solution. If possible, I want to select a section which isn't viewable on the Forum and isn't open for new posts (so only threads by staff members). This will keep the comments on the CMS and only one article. Perfect for the news articles.

But we have a lot of members who posts quality articles on the Forum so I need to use the "Promote to Article" button as well. Is this where your mod comes in action? And is it possible to combine this mod with the things I told above?

I hope you get my situations and I would love to hear from you if and how this mod can help me.

Thanks again for your time and sorry if I'm bothering you with all my questions.

Carnage 12-25-2009 09:00 PM

i'm not 100% sure i've followed what you are trying to do but here is what this mod will do:

1. If you create an article in the cms, the comment thread will appear in the cms comments forum as defined in vb options.

2. If you promote a blog post, there will be a comments thread created in the cms comments forum.

3. If you promote a Forum post the thread that that post comes from will be used for the comments.

-----------

If you want multiple forums to contain the posts from articles; heres how you can do it with this mod.

1. Instead of creating a new cms article Create a forum post in the forum you wish to use for comments for that article.
2. Promote the post to an article.
3. The thread you created will be used for comments.

daveaite 12-26-2009 04:29 AM

This should definately be part of vbulletin gold. TSK TSK

peleh 12-30-2009 09:26 PM

Caused some problem here:

Fatal error: Call to a member function register() on a non-object in /home/xxxx/xxxxxx.com.br/forum/packages/vbcms/comments.php on line 706

linuxututs 12-31-2009 04:19 AM

This will become the MOTM ! "Subscribed To Thread"

A must have here for-real...

Thanks,

buontaiviem 12-31-2009 12:04 PM

1 Attachment(s)
It give error unicode utf-8 font when leave comment on CMS but without error when reply on theard at forum.

Can you fix it?

RadioErewan 12-31-2009 12:50 PM

Quote:

Originally Posted by buontaiviem (Post 1943316)
It give error unicode utf-8 font when leave comment on CMS but without error when reply on theard at forum.

Can you fix it?

Isnt it vB error?

Carnage 12-31-2009 01:54 PM

Quote:

Originally Posted by peleh (Post 1942902)
Caused some problem here:

Fatal error: Call to a member function register() on a non-object in /home/xxxx/xxxxxx.com.br/forum/packages/vbcms/comments.php on line 706

This can happen due to a bug in the cms; only fix for it i've found so far is to clear the cms cache from the admin cp; it should be fixed in vb 4.0.1

Carnage 12-31-2009 02:25 PM

Quote:

Originally Posted by buontaiviem (Post 1943316)
It give error unicode utf-8 font when leave comment on CMS but without error when reply on theard at forum.

Can you fix it?

Not sure about this one... I think it may be something vbulletin related however...

Boots 12-31-2009 02:30 PM

Thank god someone stepped up to provide basic functionality that should have been there in the first place.

Boots 12-31-2009 02:53 PM

Quote:

1. Make a backup copy of includes/xml/hooks_vbcms.xml
Does this apply to GOLD PL1?

Dygear 12-31-2009 07:33 PM

That is a job done outstandlying well, if you need any help I would be more then willing to help with support. MOTM for sure!

buontaiviem 12-31-2009 08:22 PM

Quote:

Originally Posted by Carnage- (Post 1943417)
Not sure about this one... I think it may be something vbulletin related however...

Thanks, i will try find something on VB CMS code :)

Carnage 01-01-2010 12:54 PM

Quote:

Originally Posted by Boots (Post 1943447)
Does this apply to GOLD PL1?

Yes. I will update the first post once vb release a version with the issue fixed.

Quote:

Originally Posted by buontaiviem (Post 1943595)
Thanks, i will try find something on VB CMS code :)

If it dosn't get fixed along with the friendly urls supporting proper utf-8 encoding etc, i'll look into this more myself, However I think the only result of my looking into it will be to submit a bug report to vb.

GeorgeB85 01-01-2010 01:01 PM

Does anyone know if all the issues have been fixed yet?

buontaiviem 01-01-2010 02:23 PM

Quote:

Originally Posted by Carnage- (Post 1943954)
Yes. I will update the first post once vb release a version with the issue fixed.



If it dosn't get fixed along with the friendly urls supporting proper utf-8 encoding etc, i'll look into this more myself, However I think the only result of my looking into it will be to submit a bug report to vb.

Yes, if you find a bug, please report to vb fix it.

Sarcoth 01-01-2010 03:34 PM

Awesome mod Carnage. I have to agree with the others, this is a basic functionality that should already be a part of Gold. Thanks for making this mod.

Carnage 01-01-2010 05:07 PM

Quote:

Originally Posted by GeorgeB85 (Post 1943958)
Does anyone know if all the issues have been fixed yet?

The deleting original thread issues has been /mostly/ fixed (it unfortunaltly still deletes tags attached to the thread, and will do untill vb move one of the hooks i'm using to a slightly more sensible place.

Issues with character encoding remain; but i'm waiting on the next vb release to see if that fixes this along with the friendly urls.

The issue with the hooks file you have to upload still exists, but uploading the file provided here fixes it.

Verionia 01-03-2010 01:59 AM

Will download this once bugs are fixed :)

Morrus 01-04-2010 04:34 PM

This ia a great idea! I was actually very surprised to find out that promoting things to article status didn't work that way be defult, as it seems very obvious.

For me at least I'd need it to do the same with blogs as it does with forum threads. I'm far more likely to promote a blog post when one of my columnists writes an article, and having all the comments being on one place under the blog entry rather than in two places makes much more sense.

Carnage 01-06-2010 02:44 PM

Its much harder to do with blog posts; as the comments for blog posts are stored separatly from the beggining. It might be something I look at doing when i've got more time; but right now I can almost certainally say that there won't be hooks in the right places to perform the task without code edits.

meissenation 01-06-2010 05:16 PM

Installed and promoted a thread to an article with no problems. Thanks!

Question and pardon me if it's stupid - if I promote a thread that already has a bunch of replies will it break anything?

Carnage 01-06-2010 07:22 PM

You'll get unexpected results if you promote the second post of a thread; (eg the first post won't be shown at all but all the rest of the comments (including the second post) will be) but otherwise it should be fine; better yet, the existing posts in the thread will also be shown as comments as soon as the article is published.


All times are GMT. The time now is 01:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01700 seconds
  • Memory Usage 1,834KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete