Jump to content

"Deleting" homepage_logo from Editorial Module


Recommended Posts

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.php

Find 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

  • 2 weeks later...

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...