vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Social Groups messages (https://vborg.vbsupport.ru/showthread.php?t=214027)

kursed 05-19-2009 07:29 AM

Social Groups messages
 
Right now they're in an order, where it shows older messages at front and newer messages at the end.

Can I reverse the order, if so, how? So that newer messages are shown in front, just like in 3.7 version of vBulletin.

------

I asked the same question on vBulletin.com, and was told to do the following:

Quote:

Just create a plugin at group_view_message_query setting the order to desc instead of asc.

If you can't figure out how to do that, you should ask for help over on vbulletin.org
-------

So can anyone here be kind enough to guide me as to how can I create this plugin?

Thank you in advance.

--------------- Added [DATE]1242729442[/DATE] at [TIME]1242729442[/TIME] ---------------

Folks, it's very important that I set this setting right, it's irking my users a lot. So please, can someone guide me on how it can be done?

Lynne 05-19-2009 03:19 PM

hook location: group_view_message_query
PHP Code:

$this->sortfield 'dateline';
$this->descending 'DESC'

That should work - it's a pretty simple one.

kursed 05-20-2009 04:03 PM

Can you please tell me as to where can I find this particular hook?

Lynne 05-20-2009 04:53 PM

If you don't understand the plugin system, you should read this in the manual - Plugin System

kursed 05-20-2009 05:52 PM

Thank you. Now it does show new messages on the first page. But there is one little problem. As soon as one posts a new message, he's taken to the start of the discussion (first page in this instance). How can I correct that? So that the user is taken to the page, where he's updated the message (end of discussion).

Lynne 05-20-2009 06:25 PM

I would guess you would have to do something regarding the redirect. Look at the groups.php page and see where that is being done.

Actually, I just tested this and see a problem with the messages getting 'reposted' - I think you'll have to do a similar plugin as above to the ajax posting template. Again, take a look at the code to see what is going on.


All times are GMT. The time now is 09:05 PM.

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.01009 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete