Page 2 of 2 FirstFirst 1 2
Results 16 to 16 of 16

Remove IDs in thread URL?

This is a discussion on Remove IDs in thread URL? within the General Discussion forums, part of the vBSEO SEO Plugin category; decode the ID in roman numbers ? 1 = I 2 = II .. 5 = V like this Topis ...

  1. #16
    Senior Member
    Real Name
    Marco
    Join Date
    Feb 2006
    Posts
    520
    Liked
    1 times
    decode the ID in roman numbers ?

    1 = I
    2 = II
    ..
    5 = V

    like this Topis was
    [forum_path]/ix-vii-ii-viii/[thread_title].html

    just an idea or use another decryption from numbers to chars

    but this was real a unperformed funtion

    or use somthing like this
    Code:
    function encrypt($input)
    {
    	$output = '';
    	$code = array(
    	1 => 'a',
    	2 => 'b',
    	3 => 'c',
    	4 => 'd',
    	5 => 'e',
    	6 => 'f',
    	7 => 'g',
    	8 => 'h',
    	9 => 'i',
    	0 => 'o',
    	'.' => 'z',
    	',' => 'y');
    
    	$chars = strlen($input);
    	
    	for($i = 0; $i < $chars; $i++)
    	{	
    		$output .= $code[substr($input, $i, 1)];
    	}
    	
    	
    	return $output;
    
    }
    function decrypt($input)
    {
    	$output = '';
    	$code = array(
    	'a' => 1,
    	'b' => 2,
    	'c' => 3,
    	'd' => 4,
    	'e' => 5,
    	'f' => 6,
    	'g' => 7,
    	'h' => 8,
    	'i' => 9,
    	'o' => 0,
    	'z' => '.',
    	'y' => ',');
    
    	$chars = strlen(strtolower($input));
    	
    	for($i = 0; $i < $chars; $i++)
    	{	
    		$count = substr($input, $i, 1);
    		$output .= $code[$count];
    	}
    	
    	
    	return $output;
    
    }
    Last edited by Onur; 12-05-2006 at 07:46 AM. Reason: code added

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. vBSEO 2.4.0 Released - Includes Google AdSense Targeting Feature!
    By Juan Muriente in forum vBSEO Announcements
    Replies: 74
    Last Post: 05-20-2006, 10:29 PM

Posting Permissions

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