Originally posted by GumSlone
View Post
Title Name Help
Collapse
X
-
AWESOME! It works, Thanks a million Gumslone.
Im gonna sound like nuisance now but my auto index script has sort by name and date.
When i sort by date then your above code works and shows: Music Video | PlayWap
But when its sorted by name (default) like this: /dl/index.php?dir=/Music Videos&p=0&sort=0
The code above makes the title - 0&sort | PlayWAP
I know its not a biggy but if you dont mind and if there is a another piece of code I can use, I would really appreciate it.
Thanks again
EDIT: I just saw the other code you posted, that seems to make it all work! A million thanks man!!!!
Last edited by brentg; 29.03.13, 07:43.
Leave a comment:
-
yes
or you could also do:PHP Code:str_replace('%20', ' ', end(array_filter(explode("=", $_SERVER['REQUEST_URI']))))
PHP Code:str_replace('%20', ' ', end(array_filter(explode("/", $_GET['dir']))))
Leave a comment:
-
Gumslone THANK YOU SO MUCH!!!

Added after 28 minutes:
Hi Gumslone I just had a look on other pages and titles with spaces return as eg. Music%20Videos | PlayWap.Mobi anything I can add into the code to remove those symbols. ThanksLast edited by brentg; 28.03.13, 16:47.
Leave a comment:
-
PHP Code:end(array_filter(explode("=", $_SERVER['REQUEST_URI'])))
Leave a comment:
-
Hi guys sorry to bring this up again but i need add the folder name to my header to further help with SEO.
at the moment i got this code as my header in index.php (Autoindex script)
Im using:and it shows:PHP Code:echo '<title>'.str_replace(".php","",basename($_SERVER['REQUEST_URI'])).'|PlayWAP.Mobi</title>';
I would like it to show like: Wallpaper | PlayWAP.MobiCode:index?p=0&sort=1&dir=Wallpaper | PlayWAP.Mobi:
I googled all functions, tried them all. They returning as error or doesn't do anything.
Thanks so muchLast edited by brentg; 28.03.13, 00:15.
Leave a comment:
-
thanks so much software its working now, my script does not use sql
Im using this:
2 Chainz ft 50 Cent - Riot (Remix).mp3|PlayWAP.MobiPHP Code:echo '<title>'.$title = basename($_GET['file']).'|PlayWAP.Mobi</title>';
Sorry one more question, what code like the above can i use for the folder titles.
|PlayWAP.Mobi
Thanks
Leave a comment:
-
Originally posted by brentg View Postthanks software,
i tried the code, never worked edited and the symbols were gone but my content never showed?
Here we go: 2%20Chainz%20ft%2050%20Cent%20-%20Riot%20%28Remix%29.mp3&sort=0|PlayWAP.Mobi
Thanks
I guess in your script, mysql_connect is used after sending the head of the html, you cud have used the filename in the title directly from db records,
anyways, you may use the below code
PHP Code:$title = basename($_GET['file']);
echo "<title>$title | " . $_SERVER['HTTP_HOST'] . "</title>";
Last edited by softwarefreak; 16.09.12, 07:24.
Leave a comment:
-
thanks software,
i tried the code, never worked edited and the symbols were gone but my content never showed?
Here we go: 2%20Chainz%20ft%2050%20Cent%20-%20Riot%20%28Remix%29.mp3&sort=0|PlayWAP.Mobi
Thanks
Leave a comment:
-
If this doesn't works copy & paste the URL of the page herePHP Code:$title = rawurldecode(str_replace(".php", "", basename($_SERVER['REQUEST_URI'])));
$title = preg_replace("#&sort=[0-9]+#i", '', $title);
echo "<title>$title | " . $_SERVER['HTTP_HOST'] . "</title>";
Leave a comment:
-
Thanks mfreak
where do i exactly put the urldecode
Code:'.str_replace(".php","",basename($_SERVER['REQUEST_URI'])).'
Leave a comment:
-
Title Name Help
Hi All
i got a small problem that hopefully someone can help.
For the 'title' i have this code but it outputs with all the 'symbols', what can i change to remove all the symbols and '&sort=1'
but the title name shows as:PHP Code:echo '<title>'.str_replace(".php","",basename($_SERVER['REQUEST_URI'])).' |'.$_SERVER['HTTP_HOST'].'</title>';
what can i do to make it show like this:Kid%20Cudi%20-%20Creepers.mp3&sort=1 |SiteName
Kid Cudi - Creepers.mp3 | SiteNameTags: None
Leave a comment: