You are not logged in.

#26 13 Dec 2006 5:32 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Hmm, added all 3 just in-case, and tested:

Works

Code:

http://www.bamboocommandos.net/prank/image.php?nick==[bc]=butcher

Doesnt work

Code:

http://www.bamboocommandos.net/prank/image.php?nick=bc_butcher
http://www.bamboocommandos.net/prank/image.php?nick=bcbutcher
http://www.bamboocommandos.net/prank/image.php?nick=butcher

When using just "Butcher", it naturally doesnt target me. But none of the URLs can be output with .jpg at the end...


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#27 13 Dec 2006 6:35 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

dont use all 3.  leave #2 there.  then test using http://www.bamboocommandos.net/prank/=% … utcher.jpg

Offline

 

#28 13 Dec 2006 9:35 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Tested both your example and "http://www.bamboocommandos.net/prank/image.php?nick=butcher.jpg", it still wont output any images when it has .jpg at the end. Tested both Opera and IE, neither gave any outcome.


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#29 13 Dec 2006 9:58 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

MadHatter :

dont use all 3.  leave #2 there.  then test using

Code:

http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher.jpg
use that url...

mod rewrite allows you to refer to your image as if it were an actual file on the file system.  once you have the rules written, you dont need to refer to image.php w/ parameters... just something like the link above.

those rules need to be in the root level .htaccess file (in the main website folder, not under /prank/.htaccess)

Offline

 

#30 13 Dec 2006 12:34 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Ahh, that probably answers it, cause I kept editing the stuff in the .htaccess in /prank/bf2, but damn, now I need to figure out what should be there.

EDIT:

Works:

Code:

http://www.bamboocommandos.net/prank/image.php?nick==%5Bbc%5D=butcher

Doesnt work:

Code:

http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher.jpg
http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher

I added the code:

____________________________________________________________________________________
RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl
RewriteRule ^.*$ http://127.0.0.1 [R,L]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl/[0-9].[0-9]*
RewriteRule ^.*$ http://127.0.0.1 [R,L]
# -------------------------------------------
# END Kill PERL scripts
# -------------------------------------------

# -------------------------------------------
# Lazy Google Tap
# -------------------------------------------

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7&$8=$9 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7#$8 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5#$6 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3#$4 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3 [L]

RewriteRule ^BC-index.html#(.*)$ /index.php#$1 [L]
RewriteRule ^BC-index.html$ /index.php [L]

RewriteRule ^BC-(.*)\.html#(.*)$ /modules.php?name=$1#$2 [L]
RewriteRule ^BC-(.*)\.html$ /modules.php?name=$1 [L]
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

RewriteEngine off
____________________________________________________________________________________

Within my .htaccess file, which is within the public_html folder, guess problem is that I need to know what should be inside the .htaccess in the bf2 folder in the prank folder... Hmm, is it:

Code:

RewriteRule ^/bf2/(\w+)$\.html/ /bf2/index.php?op=foo&nick=$1

By any chance?

Last edited by Butcher (13 Dec 2006 12:42 pm)


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#31 13 Dec 2006 1:16 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

the path in the rewrite rule needs to be the relative path to the script.  if you have image.php inside prank/bf2 then you need to modify the rewrite rule to add that.

if you want to be able to alias the normal stats page, then it will be similar

Code:

RewriteRule ^bf2/(.+)$\.html$ /bf2/index.php?op=foo&nick=$1 [L]

assuming bf2 is a folder off of root (and not under prank).

Offline

 

#32 13 Dec 2006 1:32 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

BF2 folder is under prank, lol.

Ok, in .htaccess (in prank/bf2), it should say:

Code:

RewriteRule ^/bf2/(\w+)$\.html/ /bf2/index.php?op=foo&nick=$1

Right?

And in .htaccess (in public_html), it should say:

Code:

RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

Right?


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#33 13 Dec 2006 1:47 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

you only need one set of rewrite rules.  they all go in the top level .htaccess file (directly inside public_html if thats the same place your domain level files are at... the ones being used when nothing else but bamboocommandos.com is given). 

nothing else has to be done from that point on, but make sure your rewrite rules include the full path to the image.php and index.php files:

Code:

RewriteRule ^prank/([^/].*)\.jpg$ /prank/bf2/image.php?nick=$1 [L]

Offline

 

#34 13 Dec 2006 1:57 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Ok, the .htaccess from prank/bf2/ was removed, and the .htaccess in public_html now says:

***************************************************************************
RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl
RewriteRule ^.*$ http://127.0.0.1 [R,L]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl/[0-9].[0-9]*
RewriteRule ^.*$ http://127.0.0.1 [R,L]
# -------------------------------------------
# END Kill PERL scripts
# -------------------------------------------

# -------------------------------------------
# Lazy Google Tap
# -------------------------------------------

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7&$8=$9 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7#$8 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5#$6 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5 [L]

RewriteRule ^BC-(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3#$4 [L]
RewriteRule ^BC-(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3 [L]

RewriteRule ^BC-index.html#(.*)$ /index.php#$1 [L]
RewriteRule ^BC-index.html$ /index.php [L]

RewriteRule ^BC-(.*)\.html#(.*)$ /modules.php?name=$1#$2 [L]
RewriteRule ^BC-(.*)\.html$ /modules.php?name=$1 [L]
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]
RewriteRule ^prank/([^/].*)\.jpg$ /prank/index.php?nick=$1 [L]

RewriteEngine off
***************************************************************************

Still, the link:

Code:

http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher.jpg

Gives me a 404, hmmm...


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#35 13 Dec 2006 2:19 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

do you have the index.php and modules.php in the same folder as this .htaccess file?  I noticed that your google tap isnt working either.  if it is, you may have to add

Code:

Options +followsymlinks

at the very top of your .htaccess file.


on a side note, check your PM box (if you haven't already)

Offline

 

#36 14 Dec 2006 6:37 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Yes, .htaccess, index.php and modules.php are all in public_html, added the link at the top of the .htaccess file.

Still wont let me use$m[1]www.bamboocommandos/prank/butcher


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#37 14 Dec 2006 1:03 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

well even if it did work you'd still need to add the .jpg to the end of that.

create a php file on your server and add this to it:

Code:

<?php 
    phpinfo(); 
?>

and either post or pm me a link to it.  need to make sure you have mod_rewrite enabled on your server.

Offline

 

#38 14 Dec 2006 1:17 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Bit long to post tongue, link in PM.

Last edited by Butcher (15 Dec 2006 5:32 am)


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#39 15 Dec 2006 7:09 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

I don't see anything in the phpinfo about mod rewrite (then again I dont see it in mine either).  maybe try removing (just temporarily) the other parts of the .htaccess to test whether the rewrite will even work

just leave:

Code:

RewriteEngine On
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

then try

Code:

http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher.jpg

Offline

 

#40 15 Dec 2006 5:32 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

It worked big_smile, .htaccess was pretty empty after the little hack thingy, so it should work out fine. Do you know how I can get it to output it like this: Someone enters their nick at the Stat Checker, and when they come to the stat page a box has the code for using this image. A guy showed me once, but I forgot to write it down. Does such a thing have a specific name? So I can google it wink

Brilliant method tough, it can be used on forums now big_smile, thanks a lot.

http://www.bamboocommandos.net/prank/=%5Bbc%5D=butcher.jpg

Last edited by Butcher (15 Dec 2006 5:34 pm)


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#41 15 Dec 2006 6:25 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

if you're talking about something like this: http://sanity-free.org/prank/index.php? … _MadHatter

then, open stats.tpl

find (may be a little different than yours is) [line 84 in mine]:

Code:

<tr>
  <td height="5" colspan="5" align="center">&nbsp;</td>
  </tr>

after, add:

Code:

  <tr align="center">
      <td colspan="5">
          Signature:<br />
          <img src="<rank_img_url>" /><br />
          <br />
          BBCode:<br />
          <input type="text" size="50px" value="[img]<rank_img_url>[/img]" /><br />
        <br />
        HTML:<br />
        <input type="text" size="50px" value='<img src="<rank_img_url>" />'><br />
        <br />
      </td>
  </tr>

open index.php

find [around line 73]:

Code:

        $file_contents = str_replace('<progress/>', round($progress, 2), $file_contents);
        $file_contents = str_replace('<rank/>', $rank, $file_contents);    
        $file_contents = str_replace('<rank_title/>', $rank_text_table[$rank], $file_contents);

after, add:

Code:

$file_contents = str_replace('<rank_img_url>', 'http://bamboocommandos.net/prank/'.urlencode($_GET['nick']).'.jpg', $file_contents);

then save or upload...


I think that messes up the formatting somewhat, but I'm sure you can manage to clean it up.

Offline

 

#42 16 Dec 2006 3:02 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Seems to work fine, [url=http://www.bamboocommandos.com/prank/index.php?nick==[BC]=Butcher.jpg]link[/url], but something weird happened to the rank picture, I see the link being connected to the right file and location, but it aint showing up. And that old problem with the progressbar deciding that it likes 2 lines instead of 1, lol.

Last edited by Butcher (16 Dec 2006 3:05 am)


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#43 16 Dec 2006 8:11 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

looks like you may be missing the ranks images in the /prank/images/ folder

Offline

 

#44 16 Dec 2006 2:36 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Their all inside the folder... Humm, and maybe there is a <br> that makes the progressbar use 2 lines.


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#45 18 Dec 2006 7:43 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

the progress bar takes 2 lines because the text is wrapped inside the div that draws the progress line.  there's something you can add the the css that lets it overflow the bounding div but I don't remember what it is off hand.

Offline

 

#46 19 Dec 2006 12:30 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Will need to have another look when I reinstalled the site, doing it all over to make sure my brother and his Spanish friend can never claim copyright over anything again.


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#47 28 Dec 2006 4:50 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

Hum, now something is wrong... I reinstalled the site and everything works well, added the rewrite rule;

Code:

RewriteEngine On
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

When looking at: http://www.bamboocommandos.com/prank/index.php?nick==[BC]=Butcher, I notice that the picture isnt showing up, and the image cant be used by the BB code it generates either, it couldnt find the location.

Something is weird, or different, my .htaccess have a lot less information than it used to:

Code:

Options All -Indexes
DirectoryIndex index.php index.html

Options +FollowSymlinks
# -------------------------------------------
# Kill PERL scripts
# -------------------------------------------
RewriteEngine On
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl
RewriteRule ^.*$ http://127.0.0.1 [R,L]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl/[0-9].[0-9]*
RewriteRule ^.*$ http://127.0.0.1 [R,L]
# -------------------------------------------
# END Kill PERL scripts
# -------------------------------------------

# -------------------------------------------
# Lazy Google Tap
# -------------------------------------------

RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7&$8=$9 [L]

RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7#$8 [L]
RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5&$6=$7 [L]

RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3&$4=$5#$6 [L]
RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3&$4=$5 [L]

RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)\.html#(.*)$ /modules.php?name=$1&$2=$3#$4 [L]
RewriteRule ^Evo-(.*)_-_(.*)_-_(.*)\.html$ /modules.php?name=$1&$2=$3 [L]

RewriteRule ^Evo-index.html#(.*)$ /index.php#$1 [L]
RewriteRule ^Evo-index.html$ /index.php [L]

RewriteRule ^Evo-(.*)\.html#(.*)$ /modules.php?name=$1#$2 [L]
RewriteRule ^Evo-(.*)\.html$ /modules.php?name=$1 [L]

RewriteEngine off

# for hosts that don't allow the above, we won't give people anything to look at
<IfModule mod_autoindex.c>
 IndexIgnore *
</IfModule>

http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#48 28 Dec 2006 8:56 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Battlefield2 avatar

was this the same .htaccess you used before?  looks like the rewrite rule for the image isnt working.  try removing everything like last time except for

Code:

RewriteEngine On
RewriteRule ^prank/([^/].*)\.jpg$ /prank/image.php?nick=$1 [L]

Offline

 

#49 28 Dec 2006 2:07 pm

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

Re: Battlefield2 avatar

There it works big_smile, weird that .htaccess thingy, seems like certain lines dont like the picture.


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 



© 2003 - 2024 NullFX
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License