Hopefully A Simple Edit to PHP

Discussion in 'PHP' started by WizardRSS, May 14, 2010.

  1. #1
    Alright, here is the page I will be referring to: http://www.wizardrss.com/cache/

    I am using the following script for that page: http://autoindex.sourceforge.net/

    Instead of showing the file name, I would like it to show the name of the actual page- for example, what it would show as the title for each page in Firefox. I don't like how it showed, for example vfdgdfgfdg.xml, I want it to show the actual title of that page.

    Could anyone take a quick look at the script in question and let me know if that is possible?

    Thanks in advance for any help!
     
    WizardRSS, May 14, 2010 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    JAY6390, May 14, 2010 IP
  3. WizardRSS

    WizardRSS Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It seems like it shouldn't be too hard of an edit...

    I can't find any information about it on their forum unfortunately.
     
    WizardRSS, May 14, 2010 IP
  4. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Its not going to be much of an edit no, but it's going to take someone time to look through and figure it out and come up with the code for you. Have you posted this on their forum? It's likely someone there has a better chance of being able to do this
     
    JAY6390, May 14, 2010 IP
  5. WizardRSS

    WizardRSS Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I did post it. But if you look on their forum, you will see very little activity unfortunately.
     
    WizardRSS, May 14, 2010 IP
  6. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #6
    You need to edit the lines in fwrite function which caches the xml files :)
     
    roopajyothi, May 15, 2010 IP
  7. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #7
    So in the column 'File', instead of the filename (such as 0a3e32d1221f7ed32d18deac578c2245.xml) you want to display the file's title (such as Demain la veille) ?
     
    danx10, May 15, 2010 IP
  8. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #8
    Yeah right! That's he is asking :)
     
    roopajyothi, May 15, 2010 IP
  9. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #9
    yes i think i can give it for free

    place this at the very end of classes/FileItem.php's constructor:
    
    
    		if(strtolower($this->file_ext()) == 'xml')
    		{
    			$c = file_get_contents($this->filename);
    			preg_match('/<title>(.*)<\/title>/', $c, $matches);
    			if(isset($matches[1]))
    			{
    				$this->filename = $matches[1];
    			}
    		}
    
    PHP:
    :D
     
    gapz101, May 15, 2010 IP