This section only applies if you are adding the plugin to your skin manually (advanced users only). You can add some parameters when you call the plugin, so that each skin can display it differently. Here's an example, that adds all of the parameters with their default values.
PHP:
| <?php $Plugins->call_by_code( 'democrcy', array( |
| 'block_start' => '<div class=bSideItem">', |
| 'block_end' => '</div>', |
| 'title' => '<h3>'.T_('Poll').'</h3>', |
| 'before_q' => '<strong id="poll-question">', |
| 'after_q' => '</strong>', |
| 'archive_link' => false, |
| 'gft' => true, |
| 'gct' => '#06c', |
| 'gcb' => '#05a', |
| ) ); ?> |
You only need to define parameters when you don't want to use the default. So, if you only wanted to change the bar color, then this would do that and leave everything else at its default value:
PHP:
| <?php $Plugins->call_by_code( 'democrcy', array( 'gct' => '#F00', 'gcb' => '#D00' ) ); ?> |
Archives
You can add a link that lets you see all of the old polls, but it requires one more edit to the _main.php (or index.main.php for 2.x and higher) file. Find the part of the file says "switch( $disp )", and add one more case to the bottom of that list:
PHP:
| case 'pollarchives': |
| |
| echo '<div class="bPost">'; |
| $Plugins->call_by_code( 'democrcy', array( 'display' => 'archives' ) |
| ); |
| echo '</div>'; |
| break; |
Any parameters that you want to edit will have to be specified again here. So, if you changed the color of the graph bars in the sidebar, you'll have to define the new color here as well. Once you've added this code, set the 'archive_link' parameter to true in the sidebar, and you'll get a link that displays the archives in the main column of your blog. This plugin call takes a special parameter, too. If you set 'allblogs' =[x]> true, then it will show old polls from all blogs, not just the blog that's displaying the poll.
Recent comments