This script notificates the Administrot about a broken link, that a user has found. Also when a user clicks on the button "Broken link", then he will se a Ajax-Window. In the Ajax-Window is a question does the user want to notificate the Administrator about the broken link or not. If the user clicks on "Yes", so the admin will get an PM. With a short text. And if the user clicks on "Cancel" in the Ajax-Window, so the window will be closed
1. Put befor
the following code:
Code
<script type="text/javascript"> function ifsend(){ var ajax_data = 'Do you want to notify the administrator, about that the link ist broken?<hr><input type="button" value="Yes" onclick="_uWnd.close(\'wronglink\');dwld_link();"> <input type="button" value="Cancel" onclick="_uWnd.close(\'wronglink\');">'; new _uWnd('wronglink','Confirm that Action',400,310,{shadow:1,autosize:1,modal:1,close:0,icon:'http://forucoz.com/file/s1/dtl.png'},ajax_data);} function dwld_link(){var s,message,hrf; hrf = window.location.href; s= 'Change_me';//Set the name of the User, who should get the notification about the broken link. message = 'Hello, [b]' + s + '[/b]!\nUser [ url=$HOME_PAGE_LINK$index/8-0-$USERNAME$]$USERNAME$[/url] thinks that this [ url=' + hrf + ']link[/url] is broken.'; $.post('/index/', {s: s,subject: 'Broken link',message: message,a: 18}, function(data){var rs = $('cmd[t="eMessage"][p="innerHTML"]',data).text();_uWnd.alert(rs,'Defekter Link',{w:200,h:95,tm:6000});});}</script>
2. Go in the Customize design to the "Page with entry full text and its comments" from the Modul where you want this script! And put the following code, where you want!
Code
<?if($USER_LOGGED_IN$)?><a href="javascript:;" onclick="ifsend();return false;">Broken Link</a><?else?>Please <a href="$HOME_PAGE_LINK$/index/3">register</a> or <a href="$LOGIN_LINK$">authorize</a> to notificate the Admin about the broken link!<?endif?>
Attention! 1. Only user that are Logged in will see the button "Broken Link", and guests will se a short text about that he should be authorized to notificate the Admin about a broken link. 2. The Security code musst be deactivated, or it would be work! 3. Replace in the 1. code this:
Code
[ url=$HOME_PAGE_LINK$index/8-0-$USERNAME$]
to this:
Code
[url=$HOME_PAGE_LINK$index/8-0-$USERNAME$]
and
Code
[ url=' + hrf + ']
to this
Code
[url=' + hrf + ']
If you have some problems with that script just ask
Edited by Dartz Source: -Removed- Author: -Removed-
- Don't lie!
"What's the difference between a wife and a job? After 10 years a job still sucks."
Post edited by Cheburator - Saturday, 2010-02-27, 1:00 PM
<script type="text/javascript"> function ifsend(){ var ajax_data = 'Do you want to notify the administrator, about that the link ist broken?<hr><input type="button" value="Yes" onclick="_uWnd.close(\'wronglink\');dwld_link();"> <input type="button" value="Cancel" onclick="_uWnd.close(\'wronglink\');">'; new _uWnd('wronglink','Confirm that Action',400,310,{shadow:1,autosize:1,modal:1,close:0,icon:'http://forucoz.com/file/s1/dtl.png'},ajax_data);} function dwld_link(){var s,message,hrf; hrf = window.location.href; s= 'Change_me';//Set the name of the User, who should get the notification about the broken link. message = 'Hello, ' + s + '!\nUser [ url=$HOME_PAGE_LINK$index/8-0-$USERNAME$]$USERNAME$[/url] thinks that this [ url=' + hrf + ']link[/url] is broken.'; $.post('/index/', {s: s,subject: 'Broken link',message: message,a: 18}, function(data){var rs = $('cmd[t="eMessage"][p="innerHTML"]',data).text();_uWnd.alert(rs,'Defekter Link',{w:200,h:95,tm:6000});});}</script>
where does this code goes , Dartz can u help me here ,
ZTSF, this script is old i know somebody who has a working one and i will contact you in PM about it or you can talk in our native language in here: http://forum.ucoz.com/forum/28-10160-1