Welcome, Guest
Username: Password: Remember me
This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

TOPIC: Hack poll v0.3.2.2 for Kunena 1.5.12 and 1.0.11

Hack poll v0.3.2.2 for Kunena 1.5.12 and 1.0.11 4 years 11 months ago #1

Hello,

I have created a hack for add poll in kunena it's now functionnal but only on Kunena 1.0.11 and 1.5.12, for previous versions check in the thread,you make poll but with infinite options , but you can make suggestions and report bug or feature request for this hack.

Voting poll options

poll_hack_xillibit.png


Add a new poll when you create a new thread :

add_new_poll.png


Kunena 1.5.12 :

Changelog, an extended changelog is present in the archive :

v0.3.2.2
-Missing part of code in kunena.php to leverage polls

v0.3.2.1
-Forgot to put right to load the poll class

v0.3.2
-Change in backend to avoid the assertion failed error
-add the five popular polls into stats

v0.3.1
-Fix bug when an user vote on option where it exists already a vote
-fix undefined variable into pollbox when you allow multiples votes for the same user

v0.3.0
-Backport of the polls from kunena 1.6.0DEV to 1.5.8, this means some adaptations on the code
-Rewrite of the hack
-Use now a class nammed kunena.poll.class.php
-you can set a time for the live of the poll, this is optional
-little change on the database model
-you can't submit your post if you haven't filled the polltitle and the options, this shows an alert
-use the class for the polls instead some code
-when you delete a thread, if a poll exist there is delete too

v0.2.0
-Rewrite of the hack
-Use of a new database model
-Show in statiscs the five popular polls
-For prevent spam the users need to wait some time before vote a new time
-Add in the poll results the list of users which are voted for this poll
  • xillibit
  • xillibit's Avatar
  • OFFLINE
  • Kunena Developer
  • I'am busy, we are busy, it's a busy business
  • Posts: 8209
  • Thank you received: 712
I don't provide support by PM, because this can be useful for someone else.
Last Edit: 3 years 9 months ago by xillibit.
The administrator has disabled public write access.
The following user(s) said Thank You: wfedin, lmt-net, lotar

Re:Hack poll for Kunena almost terminated 4 years 11 months ago #2

Did you mean that you will get the whole page instead of the info you were requesting? If so:

Look at kunena.php and search for "getpreview". Something similar would do it.

Regarding bugs:
- Did you look at the html if you have hidden <input name="id"> in there?
- To show polls only once (per page), just move it to view.php
- Useless html: see above.
  • Matias
  • Matias's Avatar
  • OFFLINE
  • Kunena Developer
  • Kunena!
  • Posts: 7200
  • Thank you received: 548
No, I'm not reading my private messages. Please use forum to get support and email for private matters.
Reviews on the Joomla Extension Directory are always appreciated.
The administrator has disabled public write access.

Re:Hack poll for Kunena almost terminated 4 years 11 months ago #3

Hi,
Did you mean that you will get the whole page instead of the info you were requesting?

yes is that.
- Did you look at the html if you have hidden <input name="id"> in there?
I haven't think to do like this.
- To show polls only once (per page), just move it to view.php
The logic poll for displayed it is in view.php, but on all the posts of the thread the poll is displayed like this and I want that is displayed only on the first post of the thread :

Now fixed

Do you have an idea for the wrong id when an want to save this post in edit mode ?
  • xillibit
  • xillibit's Avatar
  • OFFLINE
  • Kunena Developer
  • I'am busy, we are busy, it's a busy business
  • Posts: 8209
  • Thank you received: 712
I don't provide support by PM, because this can be useful for someone else.
Last Edit: 4 years 11 months ago by xillibit.
The administrator has disabled public write access.

Re:Hack poll for Kunena almost terminated 4 years 11 months ago #4

Ah, you have put poll into the message. I would have put it before first message with a short text. That way you would also see poll (and/or results) from the last page.

Easiest way to show this only in the first message, is to check ($fmessage->parent == 0) before adding the poll html.

As for id: please look at your form (html) that it contains the right id.
  • Matias
  • Matias's Avatar
  • OFFLINE
  • Kunena Developer
  • Kunena!
  • Posts: 7200
  • Thank you received: 548
No, I'm not reading my private messages. Please use forum to get support and email for private matters.
Reviews on the Joomla Extension Directory are always appreciated.
The administrator has disabled public write access.

Re:Hack poll for Kunena is fucntionnal 4 years 11 months ago #5

Now this hack is functionnal on Kunena 1.0.9.

What do you do to display message like this :

  • xillibit
  • xillibit's Avatar
  • OFFLINE
  • Kunena Developer
  • I'am busy, we are busy, it's a busy business
  • Posts: 8209
  • Thank you received: 712
I don't provide support by PM, because this can be useful for someone else.
Last Edit: 4 years 11 months ago by xillibit.
The administrator has disabled public write access.
The following user(s) said Thank You: 1master1

Re:Hack poll for Kunena is fucntionnal 4 years 11 months ago #6

Kudos for you xilli! this was requested lots :)
  • johnnydement
  • johnnydement's Avatar
  • OFFLINE
  • Elite Member
  • I'm back
  • Posts: 920
  • Thank you received: 3
The administrator has disabled public write access.
The following user(s) said Thank You: lotar

Re:Hack poll for Kunena is now functionnal 4 years 11 months ago #7

Thanks

New version 0.1.1 with some improvements, read the first post
  • xillibit
  • xillibit's Avatar
  • OFFLINE
  • Kunena Developer
  • I'am busy, we are busy, it's a busy business
  • Posts: 8209
  • Thank you received: 712
I don't provide support by PM, because this can be useful for someone else.
The administrator has disabled public write access.

Re:Hack poll for Kunena is now functionnal 4 years 11 months ago #8

Is the poll in every message like that screenshot? If it is that makes it totally unuable.
  • grumblemarc
  • grumblemarc's Avatar
  • OFFLINE
  • Elite Member
  • Still making trouble
  • Posts: 1107
  • Thank you received: 3
We love stars on the Joomla Extension Directory. :-)
The administrator has disabled public write access.

Re:Hack poll for Kunena is now functionnal 4 years 11 months ago #9

Now, I have fixed this bug, it was before the v0.1
  • xillibit
  • xillibit's Avatar
  • OFFLINE
  • Kunena Developer
  • I'am busy, we are busy, it's a busy business
  • Posts: 8209
  • Thank you received: 712
I don't provide support by PM, because this can be useful for someone else.
The administrator has disabled public write access.

Re:Hack poll for Kunena is now functionnal 4 years 11 months ago #10

xillibit wrote:
Now, I have fixed this bug, it was before the v0.1

i am using your hack, but i get a error after trying to publish.

error:

An unknown SQL error occured and your message was not posted. If the problem persists, please contact the administrator.
  • paspoes
  • paspoes's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 86
  • Thank you received: 1
Last Edit: 4 years 11 months ago by paspoes.
The administrator has disabled public write access.
The following user(s) said Thank You: 1master1
Time to create page: 0.389 seconds