Do you like the new Poll Option Box??? |
Yes
|
|
100% |
[ 4 ] |
No
|
|
0% |
[ 0 ] |
I don't know yet
|
|
0% |
[ 0 ] |
I can't figure it out
|
|
0% |
[ 0 ] |
I don't really care |
|
0% |
[ 0 ] |
|
Total Votes : 4 |
|
| Added Quick Poll Insert MOD | |
Posted: 10/18/2005 2:14 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 7:57 AM
Location: St Pete, FL
|
|
|
|
|
|
I added the Quick Poll Insert MOD which makes it easier to insert poll options, with a big text box, meaning we don't have to hit 'update' every time we want to add an extra option. Â Just put each poll option on a new line in the Poll Option message box...
|
|
Last edited by Nightrider on 10/26/2005 11:04 AM; edited 1 time in total |
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/18/2005 2:33 PM |
|
|
|
|
Site Admin |
Posts |
49593 |
Word Cnt. |
2,756,445 |
BDay |
Apr 22 |
Sign |
Taurus |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 5:57 AM
Location: Texas
|
|
|
|
|
|
Now that's what I call a great MOD!!! That was one thing I really disliked, having to reload for each option. Now maybe more people will post a poll.
|
|
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 6:08 AM |
|
|
|
|
Swan |
Posts |
147 |
Word Cnt. |
13,187 |
BDay |
Mar 7 |
Sign |
Pisces |
Sex |
|
|
|
|
Joined: Jul 29, 2005
Local time: 1:57 PM
Location: Zürich, Switzerland
|
|
|
|
|
|
Sure makes things easier...
My suggestion would be to add some help text
for the user... Like telling her/him that...
each open has to go on a new line
and that
no more than 20 options are allowed
You could easily adapt the variable:
$lang['whatever'] = 'If you do not want to add a poll to your topic, leave the fields blank.'
to display that extra little help... Like this for example:
$lang['whatever'] = 'Enter up to 20 Poll Options (each needs to be on a separate line)<br />If you do not want to add a poll to your topic, leave the fields blank.'
Neat MOD, only drawback is the space it uses up
(this could be fixed by reducing the amount of
lines displayed for the box... and the MOD would
still work)...
Thanks for adding
this MOD Nightrider...
|
|
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 7:24 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 7:57 AM
Location: St Pete, FL
|
|
|
|
|
|
After I installed this MOD, I thought that it would be better to include some instructions of how to use it. I had to guess how to use it the first time. At least if you make a mistake, you can always edit your post and fix it...
The size of the poll box is determined by the number of allowed Poll answers. If I change that setting in the ACP, the box size will change too. That said, you can't really hard code the number of Poll answers in the help because it may or may not always stay at that number. The Poll box size is limited to the number of Poll options. I don't think it will let you add more Poll questions than are allowed in the ACP...
I will see what I can do about adding the suggested help instructions. I think they would definitely help...
Thanks for the suggestions SwissCheese...
|
|
|
|
|
Back to Top |
|
|
| Re: Added Quick Poll Insert MOD | |
Posted: 10/20/2005 8:19 AM |
|
|
|
|
Swan |
Posts |
147 |
Word Cnt. |
13,187 |
BDay |
Mar 7 |
Sign |
Pisces |
Sex |
|
|
|
|
Joined: Jul 29, 2005
Local time: 1:57 PM
Location: Zürich, Switzerland
|
|
|
|
|
|
Nightrider wrote:
|
The size of the poll box is determined by the number of allowed Poll answers. Â If I change that setting in the ACP, the box size will change too. Â That said, you can't really hard code the number of Poll answers in the help because it may or may not always stay at that number.
|
You cannot (and should not) hardcode the number of Poll answers,
of course, but the MOD still works if you hardcode the height of
the poll box (ie: make it independent from being determined by
the number of allowed Poll answers)
You could hardcode it with this Patch I wrote for you Â
Code:
|
##############################################################
## MOD Title: Quick poll insert - PATCH to set Poll Option Box Height
## MOD Author: SwissCheese < N/A > (N/A) http://www.RafikiTalk.com/mods/
## MOD Description: Sets the height of the Poll Option Box to any
## fixed value you choose and will thus display the
## same sized box, regardless of the value that is
## set in the ACP for the 'max_poll_options' variable.
##
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~1 Minutes
##
## Files To Edit: 2
## posting.php
## templates/subSilver/posting_poll_body.tpl
##
## Included Files: n/a
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
##
## Author Notes:
##
## This Patch is for the "Quick poll insert MOD" by Manipe found
## at: http://www.phpbb.com/phpBB/viewtopic.php?t=329340 which
## (obviously) needs to be installed for this Patch to work...
##
##############################################################
##
## MOD History:
##
## 2005-10-20 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/posting_poll_body.tpl
#
#-----[ FIND ]------------------------------------------------
# The actual line will be longer. It may look something like this:
# <textarea rows="{POLL_MAX_OPTIONS}" class="post" name="poll_option_text" style="width: 312px;">{POLL_OPTION}</textarea></span>
#
rows="{POLL_MAX_OPTIONS}"
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
{POLL_MAX_OPTIONS}
#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------
# The following value is just an example... You can set it to
# however many lines high you want your Poll Box to be... If
# more poll options than this value are added, the box will
# automatically display a scroll bar...
4
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
// Quick poll insert MOD, By Manipe (Begin)
'POLL_MAX_OPTIONS' => $board_config['max_poll_options'],
// Quick poll insert MOD, By Manipe (End)
#
#-----[ REPLACE WITH ]----------------------------------------
# Intentionaly left empty (ie. it will delete the above FIND)
#
//
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
|
Up to you Nightrider...
|
|
Last edited by SwissCheese on 10/20/2005 11:13 AM; edited 2 times in total |
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 9:48 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 7:57 AM
Location: St Pete, FL
|
|
|
|
|
|
I will try the MOD. Something you should know for future reference is that the REPLACE WITH option at the bottom won't work in EM. EM won't delete a line of code so it is better to comment out the line instead in your MODs...
|
|
|
|
|
Back to Top |
|
|
| Re: Added Quick Poll Insert MOD | |
Posted: 10/20/2005 9:57 AM |
|
|
|
|
Swan |
Posts |
147 |
Word Cnt. |
13,187 |
BDay |
Mar 7 |
Sign |
Pisces |
Sex |
|
|
|
|
Joined: Jul 29, 2005
Local time: 1:57 PM
Location: Zürich, Switzerland
|
|
|
|
|
|
Nightrider wrote:
|
EM won't delete a line of code so it is better to comment out the line instead in your MODs...
|
Hmmm... I'll have to investigate that...
For now I've commented it out in the code above...
|
|
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 10:11 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 7:57 AM
Location: St Pete, FL
|
|
|
|
|
|
Your little MOD doesn't work correctly. This is what it looks like after the MOD is applied:
I rolled back the changes...
|
|
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 10:23 AM |
|
|
|
|
Swan |
Posts |
147 |
Word Cnt. |
13,187 |
BDay |
Mar 7 |
Sign |
Pisces |
Sex |
|
|
|
|
Joined: Jul 29, 2005
Local time: 1:57 PM
Location: Zürich, Switzerland
|
|
|
|
|
|
Aaarrrghhh...
I haven't tested the Patch, so that is possible...
All that you actually need to do, is to replace {POLL_MAX_OPTIONS}
in templates/subSilver/posting_poll_body.tpl with a number eg 4... |
|
|
|
|
Back to Top |
|
|
| Added Quick Poll Insert MOD | |
Posted: 10/20/2005 10:36 AM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 7:57 AM
Location: St Pete, FL
|
|
|
|
|
|
Nope, just changing the {POLL_MAX_OPTIONS} to 4 yields the same negative results seen in my screenshot above. The {POLL_MAX_OPTIONS} must be loaded with more information than just the number of rows...
|
|
|
|
|
Back to Top |
|
|
| Information | |
Welcome to RCF - WHF Forum Index
-> Announcements
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
All times are GMT - 5 Hours Goto page: 1, 2 Next Page 1 of 2
Add To Bookmarks
|
|
|
|