Results 1 to 4 of 4

Thread: [RESOLVED] Unsubscribe Forum Link

  1. #1

    Thread Starter
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Resolved [RESOLVED] Unsubscribe Forum Link

    Would you be able to add a JS or HTML confirmation to the unsubscribe link in the Usercp for forums. I keep clicking them accidentally.

    P.s: I expect this done in 3 days; or you shall entail serious penalties. :P
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Unsubscribe Forum Link

    It's not likely that this will happen, and for the usual reason which is that we don't make modifications unless there is a compelling reason to do because it would have to be maintained upgrade to upgrade.

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Unsubscribe Forum Link


  4. #4

    Thread Starter
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Unsubscribe Forum Link

    I sorted it with Greasemonkey. Code below:
    Code:
    // ==UserScript==
    // @name           VBF Unsubscribed
    // @namespace      vbf
    // @description    Confirmation on VBF Unscribe Link
    // @include        http://www.vbforums.com/usercp.php
    // ==/UserScript==
    	var links = document.getElementsByTagName('a');
    	var link;
    	var href;
    
    	for (var x = 0; x < links.length; x++) {
    		link = links[x];
    		href = link.getAttribute('href');
    
    		if (href == null) {
    			continue;
    		}
    	
    		if (href.indexOf('subscription.php?do=removesubscription') != -1) {
    			link.addEventListener('click', function(e) {
    					if (! confirm('Do I really want to unsubscribe?')) {
    						e.preventDefault();	
    					}
    				}, false);
    		}
    
    
    	}
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width