MrBaseball34 Posted July 16, 2010 Share Posted July 16, 2010 The code changes below allow you to not show the big Homepage's logo in the "Home text editor v1.5" (editorial) module.Open /modules/editorial/editorial.phpFind this line: $this->_html .= $errors == '' ? $this->displayConfirmation('Settings updated successfully') : $errors; Add this code BEFORE the line above: // rename the logo image if checked... $oldname = dirname(__FILE__).'/homepage_logo.jpg'; $newname = dirname(__FILE__).'/_homepage_logo.jpg'; if(isset($_POST['showlogo'])) { if (file_exists($oldname)) { rename($oldname, $newname); } else { $errors .= $this->displayError($this->l('File: '.$oldname.' doesn\'t exist')); } } else { if (file_exists($newname)) { rename ($newname, $oldname); } else { $errors .= $this->displayError($this->l('File: '.$newname.' doesn\'t exist')); } } Find this coee: <input type="file" name="body_homepage_logo" /> Add this code immediately AFTER line above: '.$this->l('Do not show Logo Image').' <input type="checkbox" name="showlogo" value="1"'.(!$homepage_logo ? 'checked': '').'/><br /> For some reason, this code isn't accurately reflecting if the image is shown. (!$homepage_logo ? 'checked': '') It is always checked. I'd appreciate it if somebody could help figure this one out... Link to comment Share on other sites More sharing options...
taoreflex Posted July 26, 2010 Share Posted July 26, 2010 I couldn't see anywhere for posting bugs, but this is definately a bug. There is a field for uploading your own logo (browse local computer, select file, etc) but the upload part is missing entirely. As others have pointed out elsewhere the only way to replace the "homepage_logo" image with your own is via FTP, and even then it doesn't show your own image in the Editorial Module. So if anybody knows where to post bugs maybe they could mention where. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 26, 2010 Author Share Posted July 26, 2010 There is no "field" in the database. The code uses the image named homepage_logo.jpg located in the editorial module's directory. When you select it, it transfers the image to the editorial module's directory and renames it homepage_logo.jpg.It is not a bug, per se, just an extremely bad design.Edit: For what it's worth, it also creates an XML file with the info in it, including the link to the logo you just uploaded and the system renamed to homepage_logo.jpg. Link to comment Share on other sites More sharing options...
dixie Posted July 26, 2010 Share Posted July 26, 2010 I have the home text editor module installed on my site, and works as it should. I uploaded a small logo via the configure settings for the editor module. The small logo shows correctly on the homepage. I'm not live yet, but I copied some script that might be useful to you, as follows. I'm not a coder, but I do understand that the logo you upload under "appearances" upload logo, is different than the logo you upload under "configure" in the editor module. I'm new and probably don't have a clue about your problem, but I thought I would try. Please forgive my dumbness if I didn't help. Link to comment Share on other sites More sharing options...
taoreflex Posted July 26, 2010 Share Posted July 26, 2010 There is no "field" in the database. The code uses the image named homepage_logo.jpg located in the editorial module's directory. When you select it, it transfers the image to the editorial module's directory and renames it homepage_logo.jpg.It is not a bug, per se, just an extremely bad design.Edit: For what it's worth, it also creates an XML file with the info in it, including the link to the logo you just uploaded and the system renamed to homepage_logo.jpg. I'm not so sure. If that was the case then my image should have appeared on my site. It didn't until I changed the name to homepage_logo.jpg on my local machine and ftp'd it over.I don't know anything about a database related to it. There's a field for selecting your image in the home text editor module. That's what I did. Clicked on update editor. The image on my site remained the same.And:dixie, no dumbness involved. Just looks like different experiences (maybe different versions). I got the effect I wanted by ftping the image over. If it works for someone else where it didn't work for me, then I may have to report interference by supernatural powers instead of a bug. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 27, 2010 Author Share Posted July 27, 2010 May be a permissions issue in your editorial module directory. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now