Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+13 votes
2.3k views
in Plugins by
edited by

This is a little widget that displays your forum's recent events. It needs the event logger enabled.

Download: https://github.com/echteinfachtv/qa-recent-events-widget
 

Screenshot Position Sidepanel:

sidepanel

 

Screenshot Position Main:

main


Question2Answer Recent Events Widget v0.1

Description

This plugin for Question2Answer displays the newest events of your q2a forum in a widget.

Features

  • considers questions/answers/comments/best-answer-selects as events to show
  • needs plugin "Event Logger" enabled, check Admin > Plugins >Event Logger >options (tick "Log events to qa_eventlog database table")

Installation

  1. Install Question2Answer
  2. Get the source code for this plugin from _github, download directly from the project page and click Download
  3. Extract the files to a subfolder such as q2a-revent-events-widget inside the qa-plugins folder of your Q2A installation.
  4. Change language strings in qa-recent-events-widget-lang.php
  5. Navigate to your site, go to Admin -> Plugins on your q2a install.
  6. The event logger plugin must be active, see option Log events to qa_eventlog database table.
  7. Then go to Admin >Layout >Available widgets, and add the widget "Recent Events Widget" where you want it to appear

Disclaimer

This is beta code. It is probably okay for production environments, but may not work exactly as expected. You bear the risk. Refunds will not be given!

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Copyright

All code herein is OpenSource. Feel free to build upon it and share with the world.

About q2a

Question2Answer is a free and open source platform for Q&A sites. For more information, visit: www.question2answer.org

Final Note

If you use the plugin: + Consider joining the Question2Answer-Forum, answer some questions or write your own plugin! + You can use the code of this plugin to learn more about q2a-plugins. It is commented code. + Thanks!

 

by
Still same problem- check my site: http://qstacks.com/ I will keep it installed for few more minutes until you check and reply
The recent event is in the sidebar
by
For your Info:
The tooltip shows, when the site is half loaded on browser, but when the site is loaded completely, then the problem comes. So, this might be the malfunction or conflict between 2 plugins or 2 javascripts.
by
Ah... forgot to add the CSS for the tooltip. Now added to qa-recent-events-widget.php Just update this file again: https://github.com/echteinfachtv/qa-recent-events-widget/blob/master/qa-recent-events-widget.php
by
Yes, Now working perfect! It will be far better, if it had the live ajax updation! Thanks for the plugin!

3 Answers

+1 vote
by

Shows why the question mark? Russian language.

by
edited by
This is probably an html-utf-encoding issue, I added a utf8_encode() to return the $listAllEvents from qa-plugin.php. Could you try the new file and tell me if it works with cyrillic now: https://github.com/echteinfachtv/qa-recent-events-widget/blob/master/qa-plugin.php

Btw, I checked your site http://voprosof.net/ - I see everything correctly displayed.
by
edited by
I found the issue and tested it: substr() needs to be told that we have a UTF8 string, e.g.: $qTitleShort = mb_substr($qTitle,0,22,'utf-8');

I update the plugin in a couple of minutes.
by
edited by
by
Thank you very much, the latest version helped fix the problem. with previous ENT_QUOTES, 'UTF-8' is not quite help.
0 votes
by
Hi i tested your plugin and it works fine but i have some questions:

1. Can you make it autorefresh with ajax technology?

2. I want to hide the time before the event and add the user avatar image. How i can achieve that ?

Thanks in advance and waiting for your answers
by
It needs hardcoding ?
by
Try to read and understand the plugin code how it retrives the information .
implement JQuery ajax functionality with qa funcitons to get the same information at a certain time interval
after getting the data update the DOM element using JQuery
Enjoy . I think it is not so tough as the funhctionality is already there just you need to implement the ajax features with some code tweaks .
0 votes
by
Is it possible to display only the content which user has favorited( like Q&As and tags)
by
no, this is not implemented.
...