Jump to content


Photo

Need help changing code in index.php


  • Please log in to reply
13 replies to this topic

#1 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 29 September 2017 - 11:59 AM

Hai, there I am a newbie in PHP/HTML. I have some experience but not enough to change all this code by myself.
I want to change the position of my site logo to the center. 
 
Here are the code:
 
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
    <div id="logo">
  <a href="<?php echo $this->params->get('logo_link')?>">
      <img style="width:<?php echo $this->params->get('logo_width')?>px; height:<?php echo $this->params->get('logo_height')?>px; " src="<?php echo $this->params->get('logo_file')?>" alt="Logo" />
  </a>                     
    </div>
</div>
 
Thanks in advance.
 
Best regards,
Joey

#2 archive

archive
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 29 September 2017 - 04:46 PM


I have some experience but not enough to change all this code by myself.

 

If that's the case, then you probably shouldn't be dabbling with it: apart from the fact that that isn't where your problem lies. As you can see from the code, it's [unnecessarily] difficult to read and if you don't understand what's going on - leave well alone, .

 

You have several classes interfering with the layout and tracking them down is where you need to focus your attention as this will be how you can centre your logo.



#3 ginerjm

ginerjm
  • Members
  • PipPipPip
  • Handball player
  • 3,974 posts
  • LocationVoorheesville NY

Posted 29 September 2017 - 06:53 PM

You apparently have a Class defined that manages to display your logos (and other things?).  Seems like kind of limited purpose for an entire Class.  But since you have it, shouldn't there already be some kind of positioning logic built into that Class?  Did you write this code/class?  If so you should step back and get a better handle on classes.


JG
PS - If you're posting here you should be using:
        error_reporting(E_ALL);
        ini_set('display_errors', '1');

at the top of ALL php code while you develop it!

#4 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 29 September 2017 - 09:28 PM

You apparently have a Class defined that manages to display your logos (and other things?).  Seems like kind of limited purpose for an entire Class.  But since you have it, shouldn't there already be some kind of positioning logic built into that Class?  Did you write this code/class?  If so you should step back and get a better handle on classes.

No, I haven't written this code. I just want to change the position of the logo on my site. I have already as the template builder, but there say I have to pay them to change it for me if I don't understand html/php. I just want to learn how to do it.



#5 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 29 September 2017 - 09:33 PM

You apparently have a Class defined that manages to display your logos (and other things?).  Seems like kind of limited purpose for an entire Class.  But since you have it, shouldn't there already be some kind of positioning logic built into that Class?  Did you write this code/class?  If so you should step back and get a better handle on classes.

No there are not. I have asked the template company to help but there says I can pay them to do it for me. I need to learn how I can change it by myself. 



#6 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 29 September 2017 - 09:35 PM

This is what there told me:

 

 

You need move this "div" to any other place,


Regards
Andrew
OrdaSoft team



#7 benanamen

benanamen
  • Members
  • PipPipPip
  • Master Coder
  • 1,446 posts

Posted 29 September 2017 - 09:41 PM

Since you are using Bootstrap you can just use the column offset class to move it over.


To save time, let's just assume I am never wrong.

The XY Problem
The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.


Make A Donation https://www.paypal.me/KevinRubio

 

"This text has been encoded with ROT26. If you can read this you must have found a backdoor. Congratulations!"


#8 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 30 September 2017 - 07:19 AM

Since you are using Bootstrap you can just use the column offset class to move it over.

Thanks but I don't know how to do this that is why I am asking for help.  



#9 archive

archive
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 30 September 2017 - 03:54 PM

Joey,

 

It's not a case of being smug, evasive, clever, belittling or any of the other things you might think is going on, the facts are that you have not read the rules for posting, don't seem to have made much effort in resolving the problem for yourself and offered a few lines of code which is about as much use as showing a picture of a kipper.

 

You've stated that you want to learn how to do it, which is great and commendable, what have you done to achieve this?



#10 benanamen

benanamen
  • Members
  • PipPipPip
  • Master Coder
  • 1,446 posts

Posted 30 September 2017 - 04:14 PM

I pointed you in the right direction. Did it occur to you to RTFM?

To save time, let's just assume I am never wrong.

The XY Problem
The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.


Make A Donation https://www.paypal.me/KevinRubio

 

"This text has been encoded with ROT26. If you can read this you must have found a backdoor. Congratulations!"


#11 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 30 September 2017 - 08:02 PM

Well thank you all for the help and comment I have been watching a lots youtube vids about bootstrap and I did some change in the code by myself. I not that I did nothing to change it. I simply do not have the time now to go and spent hours trying to fix this problem. But thanks anyway for all the help I will find a way the fix this. 



#12 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 30 September 2017 - 08:51 PM

Well thank you all for the help and comment I have been watching a lots youtube vids about bootstrap and I did some change in the code by myself. I not that I did nothing to change it. I simply do not have the time now to go and spent hours trying to fix this problem. But thanks anyway for all the help I will find a way the fix this

This is what I have changed now logo is center (<div class="col-lg-4 col-lg-offset-4">). so learn something new but just need to be patience!! Have a good one thank and ciao



#13 Yowie

Yowie
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 30 September 2017 - 08:52 PM

Joey,

 

It's not a case of being smug, evasive, clever, belittling or any of the other things you might think is going on, the facts are that you have not read the rules for posting, don't seem to have made much effort in resolving the problem for yourself and offered a few lines of code which is about as much use as showing a picture of a kipper.

 

You've stated that you want to learn how to do it, which is great and commendable, what have you done to achieve this?

This is what I have changed now and the logo is center (<div class="col-lg-4 col-lg-offset-4">). so learn something new but just need to be patience!! Have a good one thank and ciao



#14 benanamen

benanamen
  • Members
  • PipPipPip
  • Master Coder
  • 1,446 posts

Posted 30 September 2017 - 09:03 PM

See, wasn't that a lot better you learning it on your own then having us spoon feed it to you?

To save time, let's just assume I am never wrong.

The XY Problem
The XY problem is asking about your attempted solution (X) rather than your actual problem (Y). This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.


Make A Donation https://www.paypal.me/KevinRubio

 

"This text has been encoded with ROT26. If you can read this you must have found a backdoor. Congratulations!"





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users