• Resolved iWPer

    (@iwordpresser)


    SpeakUp! Email Petitions is awesome, thank you Kreg Wallace !!!

    Is there any way to add a checkbox for those who would prefer to remain anonymous in the public signature-list ?

    I don`t mind editing the plugin files.
    Maybe someone already added this function and is willing to share his/her changes.

    ===
    A second (probably easier) question; how can I add custom values (like Title, Text and image-URL) to the Facebook sharer link ? I tried several ways with no succes.
    ===

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter iWPer

    (@iwordpresser)

    Could I maybe use the (in this case unused) opt-in checkbox and only add a rule in “class.signaturelist.php” which, when the opt-in value is 1 (for example), replaces first_name with “Anonymous” and last_name with ” ” ?

    Thread Starter iWPer

    (@iwordpresser)

    Figured it out (with some help.)

    To use the Opt-in checkbox (or you could add one if you need it) to replace the online displayed signature list “simply” add a few lines to the file “class.signaturelist.php”.

    After line 56,

    foreach ( $signatures as $signature ) {

    add the following code,

    $first_name=$signature->first_name;
    	$last_name=$signature->last_name;
    	if($signature->optin==='1'){
    		$first_name='Anonymous';
    		$last_name='';
    	}

    That’s all, folks.

    Thank you for posting this bit of code. But I can’t get it to work.
    Did you change anything else besides the file “class.signaturelist.php”?
    This is what my file looks like:

    foreach ( $signatures as $signature ) {
    
    				$first_name=$signature->first_name;
    				$last_name=$signature->last_name;
    				if($signature->optin == 1){
    					$first_name='Anonymous';
    					$last_name='';
    				}
    							if ( $row_count % 2 ) {
    					$signatures_list .= '<tr class="dk-speakup-even">';
    				}
    				else {
    					$signatures_list .= '<tr class="dk-speakup-odd">';
    				}
    				$signatures_list .= '<td class="dk-speakup-signaturelist-count">' . number_format( $current_signature_number, 0, '.', ',' ) . '</td>';
    				$signatures_list .= '<td class="dk-speakup-signaturelist-name">' . stripslashes( $signature->first_name . ' ' . $signature->last_name ) . '</td>';

    Many thanks if you could help!

    Thread Starter iWPer

    (@iwordpresser)

    Seems like an easy fix; this line,

    if($signature->optin = 1){

    has to be replaced by,

    if($signature->optin==='1'){

    Good luck

    Thanks for your reply, but it didn’t do the trick.
    With some help I got it working now.

    For the people who are interested:

    Changed it to this: if($signature->optin=='1'){

    You have to edit line 64 also to this:
    $signatures_list .= '<td class="dk-speakup-signaturelist-name">' . stripslashes( $first_name . ' ' . $last_name ) . '</td>';

    Good luck all!

    hello please someone answer me please.
    i want to show email in signature list.i have no idea how to do.please help me

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Arker Phyo Per the forum welcome please post your own topic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Anonymous checkbox,hide name in signaturelist’ is closed to new replies.