XpertWorlock Posted June 20, 2008 Share Posted June 20, 2008 Hi, I have a wiki and when an image loads I'm trying to single out where in the script is the exact file name for the image i.e. name.jpg /* private */ var $img; // Image object this page is shown for /* private */ var $repo; var $mExtraDescription = false; function __construct( $title, $time = false ) { parent::__construct( $title ); $this->img = wfFindFile( $this->mTitle, $time ); if ( !$this->img ) { $this->img = wfLocalFile( $this->mTitle ); $this->current = $this->img; } else { $this->current = $time ? wfLocalFile( $this->mTitle ) : $this->img; } $this->repo = $this->img->repo; If I echo ($this->title); I get image:name.jpg (that's just how wiki does it) for example, blue_hills.jpg when echoed would be image:blue hills.jpg I have 2 choices #1. In that script is the actual filename (which would be easiest). #2. PHP scripting to change image:blue hills.jpg to blue_hills.jpg (Later on in the page I need to get info from the database) Anyone able to help me out where I should go or if they can figure out the script above better than I can. Thanks Mike Link to comment https://forums.phpfreaks.com/topic/111073-where-is-the-image-file-name/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.