Page 1 of 1

[SOLVED]Modifying Massively-2.1 - Adding an image in the index.php file

Posted: Thu Aug 03, 2023 12:10 pm
by lesmegeres
Hi,

I would like to add the logo of my company to replace the circle and down arrow in the homepage to scroll down.

The main problem I encountered is :

1) specifying the absolute path to the logo in the <img src=""> would result in a 302 Found message without any display. I do not know which php variable I could use to fill in the <img src=""> with.

I am trying to modify line 40 of the index.php file in massively-2.1 directory.

Standard line is :

Code: Select all

<li><a href="#header" class="button icon solo fa-arrow-down scrolly">Continue></a></li>
I need to do someting like :

Code: Select all

<li><a href="#header" class="button icon solo fa-arrow-down scrolly"><img src="<?php echo (php variable to my logo)?>" width="32px" alt="les deux mégères"</a></li>
Thanks for your input and advice.

Re: Modifying Massively-2.1 - Adding an image in the index.php file

Posted: Mon Aug 07, 2023 3:23 pm
by Edi
lesmegeres wrote: Thu Aug 03, 2023 12:10 pm specifying the absolute path to the logo in the <img src=""> would result in a 302 Found message without any display.
Where have you uploaded your logo?

Re: Modifying Massively-2.1 - Adding an image in the index.php file

Posted: Mon Aug 14, 2023 7:31 am
by lesmegeres
Hello and thanks for your reply,

I was out for some days. I could finally make the changes I wanted. I loaded the logo in the images/ folder of the theme 'massively-2.1'.

I commented line40 and added the following line :

Code: Select all

<li><a href="#header" class="scrolly"><img src="bl-themes/massively-2.1/images/logoLMDL_blanc.png" alt="LEs deux mégères" width="128px"></a></li>
Let me know if I could do better by using some <?php ?> with global variables ?

Thanks again.

Re: Modifying Massively-2.1 - Adding an image in the index.php file

Posted: Mon Aug 14, 2023 12:05 pm
by Edi
I would do it the same way or upload the image to the directory /bl-content.

If you want use a defined path you can find the definitions at

https://github.com/bludit/bludit/blob/v ... t/init.php