Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2008, 12:22 PM
AnAlienHolakres3's Avatar
Pligg Donor
 
Join Date: Jul 2007
Location: Prague
Posts: 117
Thanks: 7
Thanked 112 Times in 40 Posts
Send a message via ICQ to AnAlienHolakres3
"Report spam" button.

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
 
__________________
=Everything that has a beginnig has an end=
=Nevere stop fighting=

Site: http://www.vselink.org
Reply With Quote
The Following 2 Users Say Thank You to AnAlienHolakres3 For This Useful Post:
  #2 (permalink)  
Old 05-22-2008, 12:57 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,071
Thanks: 53
Thanked 25 Times in 23 Posts
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, 02:50 PM
Casual Pligger
Pligg Version: 9.8
Pligg Template: forum
 
Join Date: Oct 2007
Posts: 51
Thanks: 9
Thanked 1 Time in 1 Post
So does this function automatically remove the story/link until the admin can review it?
Reply With Quote
  #4 (permalink)  
Old 05-22-2008, 03:06 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,364
Thanks: 168
Thanked 436 Times in 275 Posts
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.
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #5 (permalink)  
Old 05-22-2008, 03:53 PM
graphicsguru's Avatar
Pligg Donor
Pligg Version: 9.9.5
 
Join Date: Aug 2006
Location: USA
Posts: 416
Thanks: 75
Thanked 48 Times in 36 Posts
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, 05:51 PM
AnAlienHolakres3's Avatar
Pligg Donor
 
Join Date: Jul 2007
Location: Prague
Posts: 117
Thanks: 7
Thanked 112 Times in 40 Posts
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.
__________________
=Everything that has a beginnig has an end=
=Nevere stop fighting=

Site: http://www.vselink.org

Last edited by AnAlienHolakres3; 05-23-2008 at 03:13 AM..
Reply With Quote
  #7 (permalink)  
Old 05-22-2008, 05:55 PM
AnAlienHolakres3's Avatar
Pligg Donor
 
Join Date: Jul 2007
Location: Prague
Posts: 117
Thanks: 7
Thanked 112 Times in 40 Posts
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.
__________________
=Everything that has a beginnig has an end=
=Nevere stop fighting=

Site: http://www.vselink.org
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
External Vote Button (EVB) Yankidank Modification Tutorials 59 07-24-2008 07:51 PM
Tracking clickthroughs from EVB voting button fingerprn General Help 0 04-18-2008 12:44 PM
remote button sazz General Help 2 03-26-2008 10:46 PM
Need help with External Vote Button Please! bbrian017 General Help 10 01-30-2008 05:28 PM
A "Pligg This" Button for blogs... nickaster Suggestions 4 04-26-2006 11:25 AM


Search Engine Friendly URLs by vBSEO 3.2.0