Firefox PHP

Module: Post Previews

Posted by Joe Curia 
Re: Module: Post Previews
May 06, 2010 12:06AM
I've been running v5.2.1.03 on a heavy traffic site for about 6 months now, working brilliantly.
I just upgraded to v5.2.1.05 and it's working equally well. Thanks for adding the option to disable for non-logged-in users.

One other feature request =)

Is it possible to introduce a X ms delay before popping up the preview?
I'm thinking that as a user moves their mouse around, it's loading the server with ajax requests that aren't really necessary.
If there was a, say, 500ms delay before popping up the preview, that would solve it nicely. Kind of normal behaviour for "tooltips" anyway.

I've mucked around with the javascript but can't seem to get it to work... like changing the onmouseover to a setTimeout(phorum_mod_post_previews_getpreview, 500)

Thanks again for your excellent module

- Skye

___
Skye Nott
Corvus Digital
Re: Module: Post Previews
September 17, 2010 10:09AM
I have just updated our forum with Post previews v5.2.1.05, and faced with some issues -
1) the new features are not working (the old features are working fine). For example even if I enable "Allow users to disable showing previews" and "Disable showing previews by default (only registered users who actively enable previews will see them)"; when I check the "Control Center->Forum Settings" as a normal user I don't find provision to enable or disable these features there at all! (Simply put, these two new feature do not for me work at all) Is it a bug, or do I need to do any template changes? I liked these enhancements, so would love to get these issues resolved for me and continue using this module. Thanks for this wonderful mod. (I loves the yahoo group style of providing the preview of first few lines of the message just below the subject line of the post more; but that is another matter. Is there any mod available that implements the same?)

2) Another issue: I want to use "Rate this thread" module and "Post previews" module together. For Post previews, I have set the width x height as 500 x 200. Now the issue is that "Post preview" will show only the content rating section provided by "Rate this thread" module and not the message itself! I want the user to see the message rating only when he clicks on it, but in preview I want the message preview itself and not the content rating. Is there a solution to this? By tweaking something either with "Rate this thread" module or with "Post preview" module?
Note: I using Phorum version 5.2.15a. The browser used to access the site is Firefox 3.6.10; our site uses emarald template.



Edited 2 time(s). Last edit at 09/17/2010 10:24AM by sreesog.
Re: Module: Post Previews
September 17, 2010 04:32PM
Quote
sreesog
I have just updated our forum with Post previews v5.2.1.05, and faced with some issues -
1) the new features are not working (the old features are working fine). For example even if I enable "Allow users to disable showing previews" and "Disable showing previews by default (only registered users who actively enable previews will see them)"; when I check the "Control Center->Forum Settings" as a normal user I don't find provision to enable or disable these features there at all! (Simply put, these two new feature do not for me work at all) Is it a bug, or do I need to do any template changes? I liked these enhancements, so would love to get these issues resolved for me and continue using this module. Thanks for this wonderful mod. (I loves the yahoo group style of providing the preview of first few lines of the message just below the subject line of the post more; but that is another matter. Is there any mod available that implements the same?)

The module should automatically insert the option into the user's control center. Are you seeing any errors in the Event Logging module? Can you double-check that the {phorum_root}/mods/post_previews/templates/emerald folder was fully uploaded to your server (ftp errors are not unheard of). Is your Emerald template in the normal folder (ie. {phorum_root}/templates/emerald)? When you say "as a normal user" does this mean that your admin user sees the option but not the normal users?

Quote

2) Another issue: I want to use "Rate this thread" module and "Post previews" module together. For Post previews, I have set the width x height as 500 x 200. Now the issue is that "Post preview" will show only the content rating section provided by "Rate this thread" module and not the message itself! I want the user to see the message rating only when he clicks on it, but in preview I want the message preview itself and not the content rating. Is there a solution to this? By tweaking something either with "Rate this thread" module or with "Post preview" module?
Note: I using Phorum version 5.2.15a. The browser used to access the site is Firefox 3.6.10; our site uses emarald template.

I can only offer you a rough hack for this problem for now. I will add this to my todo list for the module though to allow for this kind of situation. Anyways, the hack is to edit the {phorum_root}/mods/post_previews/post_previews.php file and insert lines 71-77 from the following example. This will disable the Rate This Thread formatting from the Post Previews AJAX call:
Language: PHP
  1. // get the message body to preview - formatted as necessary
  2. if (!empty($PHORUM["phorum_mod_post_previews"]["show_formatted"])) {
  3.  
  4. foreach ($PHORUM["hooks"]["format"]["mods"] as $mod_id => $mod_name) {
  5. if ($mod_name == "rate_this_thread") {
  6. unset($PHORUM["hooks"]["format"]["mods"][$mod_id]);
  7. unset($PHORUM["hooks"]["format"]["funcs"][$mod_id]);
  8. break;
  9. }
  10. }
  11.  
  12. include_once("./include/format_functions.php");
  13. $messages[$message_id] = $message;
  14. $formatted_messages = phorum_format_messages($messages);
  15.  
  16. $body = $formatted_messages[$message_id]["body"];
  17.  
  18. }

EDIT: include_once() rather than a simple include(). Thanks to Rob Granger for reporting and Maurice for debugging.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 12/24/2010 02:14PM by Joe Curia.
Re: Module: Post Previews
September 17, 2010 09:34PM
Quote

The module should automatically insert the option into the user's control center.
No, it is not doing that for the user or admin or anyone.
Quote

Are you seeing any errors in the Event Logging module?
Event logging was set to "error" level. Neither in "error" level or "warning" level no errors are showing up.
Quote

Can you double-check that the {phorum_root}/mods/post_previews/templates/emerald folder was fully uploaded to your server (ftp errors are not unheard of). Is your Emerald template in the normal folder (ie. {phorum_root}/templates/emerald)?
Yes, I think. Emarald template is working fine for me - every feature.
Quote

When you say "as a normal user" does this mean that your admin user sees the option but not the normal users?
No - none gets any extra configuration in control panel. Note that even the "Show a vertical scrollbar in the preview area" is working when enabled. But the problem is that "Allow users to disable showing previews" and "Disable showing previews by default" is not showing up in control panel. Please note that I won't say "these features are not working" because - when I check the "Disable showing previews by default" checkbox and save the changes - the preview stops appearing. (and when I enable it, it starts appearing as expected). But I don't have (or any user has) any option to change it again from control panel - because no extra options appeared in the control panel=>Forum settings.
Re: Module: Post Previews
September 17, 2010 10:36PM
Thanks a lot! have tried the hack provided for "rate this thread" + "post preview" module issue. It just works excellent! Now the post preview is showing the message content itself, even when the thread rating is there, and the user can see the message rating only when he opens the thread/message. Excellent!
Re: Module: Post Previews
October 14, 2010 06:16PM
It is working well in the forum on the "Subjet" and on "Last Post"

But, il the module "Recent Messages" I got only the preview post for the "Subjet" but not for the "Last Post" ?

1 - How I can do to have the preview post on the "Last Post" with the le "Recent Messages"

2- How I can have the preview post only on the "Last Post" wand in both the "Forul" and the "Recent Messages"
Re: Module: Post Previews
December 19, 2010 04:47AM
I was wondering whether you could suppress displaying the [attachment..] tags within the previews. Thanks!
I tried to post the stack, but then phorum thinks that I am doing a hack. I am not sure when this started because I don't use the function.
Any ideas? Can i email you or let you view the page?
Rob Granger
I didn't write this module, but if you can provide me an URL where I can see the issue in action, then I might be able to tell what's going on.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Post Previews
December 22, 2010 09:01PM
Sure I have found that disabling this stops the issue:
Show the message body in the preview formatted as it would appear on the read page:

Let me re-enable that flag and here is a link to the forum. I think that it should be doing it even if you are not logged in, let me know and I will send you a working login.

[www.ppbb.com]
Rob
rgranger@dodi.com
Sorry, only registered users may post in this forum.

Click here to login