Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
Contact the Webmasters of RCFContact   Invite a friend to Join usRecommend   Chat in IRCChat   EZ Template Change OptionEZStyle   Listen to Internet Radio while you browse...iRadio   See your private message.Login for PMs   Important LinksLinks
Member Website LinksWeb Links   Play/View our GamesGames   Register.Register
calendar_open_closeCalendar 
Added Quick Poll Insert MOD
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Announcements Add To Bookmarks

Do you like the new Poll Option Box???
Yes
100%
 100%  [ 4 ]
No
0%
 0%  [ 0 ]
I don't know yet
0%
 0%  [ 0 ]
I can't figure it out
0%
 0%  [ 0 ]
I don't really care
0%
 0%  [ 0 ]
Total Votes : 4

Added Quick Poll Insert MOD
PostPosted: 10/18/2005 2:14 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:36 AM
Location: St Pete, FL
peace.gif
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...

headbang


Last edited by Nightrider on 10/26/2005 11:04 AM; edited 1 time in total
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Added Quick Poll Insert MOD
PostPosted: 10/18/2005 2:33 PM Reply with quote
Site Admin
rb2d2
Site Admin
Posts 49593
Word Cnt. 2,756,445
BDay Apr 22
Sign Taurus
Sex Sex:Female
Joined: Sep 25, 2004
Local time: 1:36 AM
Location: Texas
texasC.gif
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
View all pictures posted by this userView user's profile Find all posts by rb2d2 Send private message   Visit poster's website Phoogle Map
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 6:08 AM Reply with quote
Swan
SwissCheese
Swan
Posts 147
Word Cnt. 13,187
BDay Mar 7
Sign Pisces
Sex Sex:Male
Joined: Jul 29, 2005
Local time: 9:36 AM
Location: Zürich, Switzerland
switzerC.gif
Sure makes things easier... Smile

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...

Applause
Back to Top
View user's profile Find all posts by SwissCheese Send private message   Visit poster's website Yahoo Messenger
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 7:24 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:36 AM
Location: St Pete, FL
peace.gif
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...

Applause
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Added Quick Poll Insert MOD
PostPosted: 10/20/2005 8:19 AM Reply with quote
Swan
SwissCheese
Swan
Posts 147
Word Cnt. 13,187
BDay Mar 7
Sign Pisces
Sex Sex:Male
Joined: Jul 29, 2005
Local time: 9:36 AM
Location: Zürich, Switzerland
switzerC.gif
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  Very Happy

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...

Wink


Last edited by SwissCheese on 10/20/2005 11:13 AM; edited 2 times in total
Back to Top
View user's profile Find all posts by SwissCheese Send private message   Visit poster's website Yahoo Messenger
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 9:48 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:36 AM
Location: St Pete, FL
peace.gif
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...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Added Quick Poll Insert MOD
PostPosted: 10/20/2005 9:57 AM Reply with quote
Swan
SwissCheese
Swan
Posts 147
Word Cnt. 13,187
BDay Mar 7
Sign Pisces
Sex Sex:Male
Joined: Jul 29, 2005
Local time: 9:36 AM
Location: Zürich, Switzerland
switzerC.gif
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...

Very Happy
Back to Top
View user's profile Find all posts by SwissCheese Send private message   Visit poster's website Yahoo Messenger
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 10:11 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:36 AM
Location: St Pete, FL
peace.gif
Your little MOD doesn't work correctly.  This is what it looks like after the MOD is applied:



I rolled back the changes...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 10:23 AM Reply with quote
Swan
SwissCheese
Swan
Posts 147
Word Cnt. 13,187
BDay Mar 7
Sign Pisces
Sex Sex:Male
Joined: Jul 29, 2005
Local time: 9:36 AM
Location: Zürich, Switzerland
switzerC.gif
Aaarrrghhh...

I haven't tested the Patch, so that is possible... Shocked

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
View user's profile Find all posts by SwissCheese Send private message   Visit poster's website Yahoo Messenger
Added Quick Poll Insert MOD
PostPosted: 10/20/2005 10:36 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:36 AM
Location: St Pete, FL
peace.gif
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...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
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

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group
  ImageShack  
  Putfile  
  TinyURL  
  CommonDreams  
  Log in  

Page generation time: 0.1526s (PHP: 81% - SQL: 19%) - SQL queries: 64 - GZIP enabled - Debug on