Changeset 1120610
- Timestamp:
- 03/25/2015 04:38:28 PM (11 years ago)
- File:
-
- 1 edited
-
simple-voting/trunk/README.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-voting/trunk/README.txt
r1120601 r1120610 37 37 <br>That's all you need to know about simplest using of the Simple Voting plugin. 38 38 <br> 39 <br> 39 40 2. <strong>Voting for arbitrary subjects</strong> 40 41 <br> 41 42 <br>If you want to allow your visitors to vote for an arbitrary subject, you must use more complex shortcode 42 43 construction, like this: 43 <br><strong>[voting] Arbitrary subject name[/voting]</strong>44 <br><strong>[voting] Arbitrary subject name [/voting]</strong> 44 45 <br> 45 46 <br>Such block of code could be placed in any article, and will rate the same <strong>'Arbitrary subject name'</strong>. 46 47 <br>To show the rating of the <strong>'Arbitrary subject name'</strong>, use following shortcode: 47 <br><strong>[voted] Arbitrary subject name[/voted]</strong>48 <br><strong>[voted] Arbitrary subject name [/voted]</strong> 48 49 <br> 49 50 <br> … … 54 55 <br>Let's imagine, that after voting, you want to send visitor to the URL http://somesite.com/somepage.php 55 56 <br>To do so, you must write something like this: 56 <br><strong>[voting] http://somesite.com/somepage.php Subject name[/voting]</strong>57 <br><strong>[voting] http://somesite.com/somepage.php Subject name [/voting]</strong> 57 58 <br> 58 59 <br>Or something like this: 59 <br><strong> 60 <br>[voting] 60 <br><strong>[voting] 61 61 <br>Another 62 62 <br>subject 63 63 <br>http://somesite.com/somepage.php 64 <br>[/voting] 65 <br></strong> 64 <br>[/voting]</strong> 66 65 <br> 67 66 <br>Or just that: 68 67 <br> 69 <br><strong>[voting] http://somesite.com/somepage.php[/voting]</strong>68 <br><strong>[voting] http://somesite.com/somepage.php [/voting]</strong> 70 69 <br> 71 70 <br>Note that although in all these examples I used same URL (http://somesite.com/somepage.php), they are 72 71 DIFFERENT voting subjects, because texts inside shortcode tags are different. 73 72 <br> 74 <br> Note.To show the rating of the subjects from above examples, you must use <strong>[voted]</strong> shortcode73 <br>To show the rating of the subjects from above examples, you must use <strong>[voted]</strong> shortcode 75 74 instead of <strong>[voting]</strong> one. Like this: 76 75 <br> 77 <br><strong>[voted] http://somesite.com/somepage.php Subject name[/voted]</strong>76 <br><strong>[voted] http://somesite.com/somepage.php Subject name [/voted]</strong> 78 77 <br> 79 78 <br><strong>[voted] … … 83 82 <br>[/voted]</strong> 84 83 <br> 85 <br><strong>[voted] http://somesite.com/somepage.php[/voted]</strong>84 <br><strong>[voted] http://somesite.com/somepage.php [/voted]</strong> 86 85 <br> 87 86 <br>After voting on any of these subjects, user will be sent to the given web page 88 ( http://somesite.com/somepage.php in our examples). To this page also will be POSTed data, containing87 (in our examples http://somesite.com/somepage.php). To this page also will be POSTed data, containing 89 88 following information about voting subject: 90 89 <br> 91 <br><strong>sv_vote</strong> users vote (from 1 to 10) 92 <br><strong>sv_textID</strong> unique subject identifier, which consists of three letters and numeric ID. 93 <br><strong>svUserName</strong> user name 94 <br><strong>svUserEmail</strong> users Email 95 <br><strong>svUserComment</strong> users comment 96 <br><strong>sv_nonce</strong> one time code, generated by the function: wp_create_nonce( 'simple-voting' ). 97 This code used for security purposes, but you may ignore it. 90 <br><strong>sv_vote</strong>: users vote (from 1 to 10) 91 <br><strong>sv_textID</strong>: unique subject identifier, which consists of three letters and numeric ID. 92 <br><strong>svUserName</strong>: user name 93 <br><strong>svUserEmail</strong>: users Email 94 <br><strong>svUserComment</strong>: users comment 95 <br><strong>sv_nonce</strong>: one time security code, generated by the function: wp_create_nonce( 'simple-voting' ). 98 96 <br> 99 97 <br> 100 98 4. <strong>Database tables</strong> 101 99 <br> 102 <br>Simple voting plugin stores all information in two database tables:100 <br>Simple voting plugin stores all information just in two database tables: 103 101 <br><strong> 104 < /br>{db_prefix}simple_voting_subjects105 < /br>{db_prefix}simple_voting_votes102 <br>{db_prefix}simple_voting_subjects 103 <br>{db_prefix}simple_voting_votes 106 104 <br></strong> 107 105 <br>
Note: See TracChangeset
for help on using the changeset viewer.