"Report spam" button.

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2008, 01:22 PM
AnAlienHolakres3's Avatar
Pligg Donor/Coder
 
Join Date: Jul 2007
Location: Prague
Posts: 116
Send a message via ICQ to AnAlienHolakres3
Hello everybody, i was asked to publish tutorial for Report spam button, so there it is. Please note "Report spam button" is nothing but redesigned "Bury" button, funkcionality is not touched.
The result looks like this:


As you can see burry button was replaced by Report spam button. When you move mouse over it, tooltip appears. This tooltip is fully CSS-based.

Needed files:
Required icon is as an attachement. This icon is supposed to be in templates/template/images folder.

Changes:
main.css
Add code:
Code:
span.tooltip{   
    position:relative;
    z-index:2400;
    color:black;
	
  }
span.tooltip:hover{
  z-index:2500;

  }
 span.tooltip div{
    display:none
  }
 .report {
    background:#fff2f2 !important;
	border:1px solid #9d0d0d;
}
 .report_header{
    background:#9d0d0d;
    color:white;
    font-weight:bold;

   }
 .report_header,.report_body{
	display:block !important;
    padding:1px 4px 2px 4px;
   }

   span.tooltip:hover div.report{
   display:block;
   position:absolute;
   background-color:yellow;
   border: 1px solid black;
   top:20px; left:85px; width:15em;
   color:#000;
   width:250px
  }
Changes in Link summary.tpl (templates/template folder):
Finde section {if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0} and replace the whole section
with:

Code:
		  {if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0}
                
                <span class="tooltip" style="width:85px">
                <span id="xreport-{$link_shakebox_index}"><a href="javascript:{$link_shakebox_javascript_report}">
                &nbsp;<img src="{$my_pligg_base}/templates/{$the_template}/images/spam.png"  style="width:16px;height:16px" align="absmiddle" /> 
                {#PLIGG_Visual_Vote_Bury#}Report spam</a></span>
                <div class="report">
                <div class="report_header">Pligg Help - Spam Report</div>
                <div class="report_body">By clicking on this button you <b>report spam</b>. Visibility of this link will be limited. This action is irreversable!</div></div>
                </span>
            {/if}
Do not forget change PLIGG_Visual_Vote_Bury to "Report spam" in lang.conf file.


Thats all. Hope it helps
Attached Images
 
Reply With Quote
  #2 (permalink)  
Old 05-22-2008, 01:57 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
So this function does not generate a list, right? It´s just a different name for bury. If it would be the first mentioned I would change it to a Report broken link button.
Reply With Quote
  #3 (permalink)  
Old 05-22-2008, 03:50 PM
Casual Pligger
Pligg Version: 9.8
Pligg Template: forum
 
Join Date: Oct 2007
Posts: 52
So does this function automatically remove the story/link until the admin can review it?
Reply With Quote
  #4 (permalink)  
Old 05-22-2008, 04:06 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Quote:
Originally Posted by xmlham View Post
So does this function automatically remove the story/link until the admin can review it?
No. Like he stated above.
Quote:
Please note "Report spam button" is nothing but redesigned "Bury" button, functionality is not touched.
Reply With Quote
  #5 (permalink)  
Old 05-22-2008, 04:53 PM
graphicsguru's Avatar
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Aug 2006
Location: USA
Posts: 399
Any one try this I get this error when I edit the
Link summary.tpl
Parse error: syntax error, unexpected T_ENDIF

templates_c/c_7e3f5c748c2d5b3d2782c554a847d9e9.php on line 378
Reply With Quote
  #6 (permalink)  
Old 05-22-2008, 06:51 PM
AnAlienHolakres3's Avatar
Pligg Donor/Coder
 
Join Date: Jul 2007
Location: Prague
Posts: 116
Send a message via ICQ to AnAlienHolakres3
Quote:
Originally Posted by graphicsguru View Post
Any one try this I get this error when I edit the
Link summary.tpl
Parse error: syntax error, unexpected T_ENDIF

templates_c/c_7e3f5c748c2d5b3d2782c554a847d9e9.php on line 378
Problem is when you replace only {if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0} you should replace the whole section which is ended by {/if}.
Please check it out.

Last edited by AnAlienHolakres3; 05-23-2008 at 04:13 AM.
Reply With Quote
  #7 (permalink)  
Old 05-22-2008, 06:55 PM
AnAlienHolakres3's Avatar
Pligg Donor/Coder
 
Join Date: Jul 2007
Location: Prague
Posts: 116
Send a message via ICQ to AnAlienHolakres3
Quote:
Originally Posted by xmlham View Post
So does this function automatically remove the story/link until the admin can review it?
You can customize admin formulas to get desirable effect.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
External Vote Button (EVB) Yankidank Questions and Comments 70 10-09-2010 03:08 PM
Tracking clickthroughs from EVB voting button fingerprn Questions and Comments 0 04-18-2008 01:44 PM
remote button sazz Questions and Comments 2 03-26-2008 11:46 PM
Need help with External Vote Button Please! bbrian017 Questions and Comments 10 01-30-2008 06:28 PM
A "Pligg This" Button for blogs... nickaster Questions and Comments 4 04-26-2006 12:25 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development