Hi:
I FINAALY broke down and decided to write my first plugin! This one will add a "Lowest Rated" to the ratings page, and allow you to specify the number of Links returned for Top Rated, Top Voted and Lowest Rated... as well as the minimum number of votes needed to be on the list.
My initial plug in worked great... but as I try to add a config page so that users can specify these numbers, I am getting confused.... (this would be from the GT generated "Edit" page)
The "Name" field is the name you want displayed for editing, NOT the variable name... correct? If it is just a TEXT field, how do I specify what variable name I want associated with the input? Here is the code now:
$mgr->install_options ( 'Ratings', [ ['Top Rated Number', '25', 'Enter the number of "Top Rated" you wish returned.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Rated Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Top Ratings.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Voted Number', '20', 'Enter the number of "Top Votes" you wish returned. ', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Voted Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Top Votes.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Bottom Rated Number', '10', 'Enter the number of Bottom Rated you wish returned.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Bottom Rated Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Bottom Votes. ', 'TEXT', [], [], '' ] ] );
For example, I want:
$mgr->install_options ( 'Ratings', [ ['Top Rated Number', '25', 'Enter the number of "Top Rated" you wish returned.', 'TEXT', [], [], '' ] ] );
to return $tr_num
And secondly,
Do I have to do:
my $tr_num = $IN->param('tr_num');
in the plugin itself, or can I just use $tr_num?
Thanks!
dave
Big Cartoon DataBase
Big Comic Book DataBase
I FINAALY broke down and decided to write my first plugin! This one will add a "Lowest Rated" to the ratings page, and allow you to specify the number of Links returned for Top Rated, Top Voted and Lowest Rated... as well as the minimum number of votes needed to be on the list.
My initial plug in worked great... but as I try to add a config page so that users can specify these numbers, I am getting confused.... (this would be from the GT generated "Edit" page)
The "Name" field is the name you want displayed for editing, NOT the variable name... correct? If it is just a TEXT field, how do I specify what variable name I want associated with the input? Here is the code now:
$mgr->install_options ( 'Ratings', [ ['Top Rated Number', '25', 'Enter the number of "Top Rated" you wish returned.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Rated Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Top Ratings.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Voted Number', '20', 'Enter the number of "Top Votes" you wish returned. ', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Top Voted Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Top Votes.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Bottom Rated Number', '10', 'Enter the number of Bottom Rated you wish returned.', 'TEXT', [], [], '' ] ] );
$mgr->install_options ( 'Ratings', [ ['Bottom Rated Minimum', '5', 'Enter the minimum number of votes needed for inclusion in the Bottom Votes. ', 'TEXT', [], [], '' ] ] );
For example, I want:
$mgr->install_options ( 'Ratings', [ ['Top Rated Number', '25', 'Enter the number of "Top Rated" you wish returned.', 'TEXT', [], [], '' ] ] );
to return $tr_num
And secondly,
Do I have to do:
my $tr_num = $IN->param('tr_num');
in the plugin itself, or can I just use $tr_num?
Thanks!
dave
Big Cartoon DataBase
Big Comic Book DataBase