{"id":232,"date":"2012-07-20T14:56:33","date_gmt":"2012-07-20T14:56:33","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=232"},"modified":"2023-12-28T23:44:03","modified_gmt":"2023-12-28T23:44:03","slug":"vote-it-up","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/vote-it-up\/","title":{"rendered":"Vote it Up"},"content":{"rendered":"<p>This is a WordPress plugin for counting and displaying votes. I used from 2012 to 2014.<\/p>\n<p><!--more--><\/p>\n<p>It&#8217;s web site is at <a title=\"Vote it Up at WordPress Plugins\" href=\"http:\/\/wordpress.org\/extend\/plugins\/vote-it-up\/\">http:\/\/wordpress.org\/extend\/plugins\/vote-it-up\/<\/a> It has a voting widget and display and a\u00a0 most popular articles widget. It has not been updated for over two years so maybe not the best to use, but I like it&#8217;s look and feel.<\/p>\n<p>In Dec 2014, The <a title=\"http:\/\/www.onfry.com\/projects\/voteitup\/\" href=\"http:\/\/www.onfry.com\/projects\/voteitup\/\">main author&#8217;s site<\/a> says,<\/p>\n<blockquote><p><b>Caution<\/b>: This plugin is no longer actively developed. While security updates may be delivered, new features are not likely.<\/p><\/blockquote>\n<h3>Display Vote Widget &#8211; Autumn 2014<\/h3>\n<p>1st Dec 2014 &#8211; Something changed so that the Display of Votes in the index and single pages no longer works. This is a shame. I have documented this at the wordpress fourm, see <a title=\"Votes not displayed on index.php at wordpress plugins support\" href=\"https:\/\/wordpress.org\/support\/topic\/votes-not-displayed-on-indexphp\">here&#8230;<\/a>.\u00a0 The developer log was last updated as at August 2014. There seems no reply so best to document here. Today I performed the following tests,<\/p>\n<ol>\n<li>I changed the display widget&#8217;s skin.<\/li>\n<li>I viewed the database table both xx_votes and xx_voteiu_data, which have 402 &amp; 25 records respectively. It would seem that the insert methods are working.<\/li>\n<li>Further examination of the plugin code, makes it clear that there is a database schema change, but I don&#8217;t think that&#8217;s the problem.<\/li>\n<li>I viewed the scores through the wordpress dashboard page, they all report 0. This is not what is held in the tables. I can&#8217;t seem to update the records through this interface either.<\/li>\n<li>I pressed the rollback the database version button, nothing seemed to happen and it continues to show that db version is 3000.<\/li>\n<li>It seems the file importdb.php has the repair functionality. How to run it?<\/li>\n<\/ol>\n<p>I have backed up the table, I have deactivated an deleted the plugin and reinstalled it, twice. The second time I deleted the database tables, I have inserted some records in the new table using the widget. It&#8217;s still displaying 0 votes. I have deactivated it.<\/p>\n<h3>Widget CSS<\/h3>\n<p>1st Nov 2014 &#8211; I have used the sidebar widget &#8220;Most Voted Post&#8221; on http:\/\/blog.davelevy.info, this does not inherit the sidebar CSS and looks odd. I put up with this for two years, it would seem. I have decided to look at this. The plugin support page, has <a href=\"https:\/\/wordpress.org\/support\/topic\/plugin-vote-it-up-widget-top-10-use-ltligt-instead-of-div\">an old thread<\/a> which documents the php that creates the widget contents. Each element is contained within a class called votemicrotext which is contained with in a class, <strong>votelistind<\/strong>. I can try and covert this into an &lt;LI&gt; tag which is what the author suggests or try and amend the CSS. The latter approach means I can keep my amendments in the child theme folders. The former requires me to amend the plugin which is not forward compatible with changes from the author, although they haven&#8217;t issued a change in a while. The &lt;LI&gt; approach seems easier; decoding the CSS will be hard.<\/p>\n<p style=\"text-align: center;\">ooOOOoo<\/p>\n<p>In order to install, you need to edit some of the .php files.<\/p>\n<p>With the zbench theme, used for this wiki and the next version of the blog, I edited themes\/zbench\/index.php &amp; themes\/zbench\/comments.php<\/p>\n<p>I inserted the code &lt;?php DisplayVotes(get_the_ID()); ?&gt; after the following comments.<\/p>\n<ol>\n<li>index.php \u00a0 \u00a0 after &lt;!&#8211; End Entry &#8211;&gt; and<\/li>\n<li>comments.php \u00a0 after &lt;!&#8211; You can start editing here &#8211;&gt;<\/li>\n<\/ol>\n<p>The little box of the ticker seems a bit bare, so I wanted to decorate it. I wanted some text, and started as a bit lazy, I tried to use a table, I wanted the tweetbutton plugin object next to it and decided to use a float left property, the tweetbutton is 20 px high, hence the row is 20px high.<\/p>\n<pre>&lt;!-- END entry --&gt;\n&lt;div style=\"float: left;\"&gt;\n&lt;table border=\"0\" style=\"padding-left: 4px; padding-right:4px;\"&gt;\n&lt;tr style=\"height=\"20px\"&gt;\n    &lt;td valign=\"TOP\"&gt;Share this on davelevy.info&lt;BR&gt;Vote it Up!&lt;\/td&gt;\n    &lt;td&gt;&lt;?php DisplayVotes(get_the_ID()); ?&gt;&lt;\/td&gt;\n&lt;\/tr&gt;&lt;\/table&gt;\n&lt;\/div&gt;<\/pre>\n<p>The next named division will flow round this to the right.<\/p>\n<p><a title=\"A List Apart on CSS\" href=\"https:\/\/web.archive.org\/web\/20060720071254\/http:\/\/alistapart.com:80\/topics\/code\/css\/\">A List Apart talks about CSS<\/a> and has two important pieces of advice<\/p>\n<ul>\n<li><a title=\"A List Apart on CSS positioning\" href=\"http:\/\/www.alistapart.com\/articles\/css-positioning-101\/\">CSS Positioning 101<\/a><\/li>\n<li><a title=\"A List Apart on CSS Floats\" href=\"http:\/\/www.alistapart.com\/articles\/css-floats-101\/\">CSS Floats 101<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is a WordPress plugin for counting and displaying votes. I used from 2012 to 2014.<\/p>\n","protected":false},"author":1,"featured_media":6745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[27,3],"tags":[920,911,65,28],"class_list":["post-232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-technology","tag-software","tag-technology","tag-vote-it-up","tag-wordpress"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2022\/10\/ictu-votes-w1024.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":10,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":7298,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/232\/revisions\/7298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/6745"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}