Re: Admin-Editable Sidebox - Support Thread
Kuroi,
Thanks for comprehensive response.
The reason you cannot see this online is that I am working on a test site that will have a completely different look and feel from the one online.
I am showing credit cards images (merged into one) inside the editable sidebox.
I started out with an image 150px wide, which is the max width allowed for sidebox, and, yes, it did overflow, probably for the reasons you explained.
So I cropped image to 141px and now it is inside the sidebox.
Still don't understand why I cannot center it exactly, will continue testing settings.
The padding 0.4em is inserted in there by the standard Zen Cart stylesheet, and if I change that setting it will have site-wide effects.
I am enclosing a screenshot of the image.
Re: Admin-Editable Sidebox - Support Thread
Folks,
I have an editable sidebox and through define page manager I am trying the following code:
<?php
// Important! You have to include it before your html code
include_once "/home/nutrili/public_html/shoppoll/poll_cookie.php";
?>
<html>
<body>
<?php
include_once "/home/nutrili/public_html/shoppoll/booth.php";
echo $php_poll->poll_process(5);
?>
</body>
</html>
The only thing that appears in the sidebox is poll_process(5);
But when I use this code in say Page 2 the poll shows up fine. Obviously there is a conflict in the code I am using in a sidebox area.
How can I adjust the code above and get the poll to work?
Thanks in advance.
Re: Admin-Editable Sidebox - Support Thread
Quote:
Originally Posted by
ckosloff
Kuroi,
Thanks for comprehensive response.
The reason you cannot see this online is that I am working on a test site that will have a completely different look and feel from the one online.
I am showing credit cards images (merged into one) inside the editable sidebox.
I started out with an image 150px wide, which is the max width allowed for sidebox, and, yes, it did overflow, probably for the reasons you explained.
So I cropped image to 141px and now it is inside the sidebox.
Still don't understand why I cannot center it exactly, will continue testing settings.
The padding 0.4em is inserted in there by the standard Zen Cart stylesheet, and if I change that setting it will have site-wide effects.
I am enclosing a screenshot of the image.
In so far as its possible to tell from a screenshot, it looks to me as though the image and padding already defined when added together do exceed the width of the box, so the image is actually centered but in a box larger than the one you#re looking at, that protrudes invisibly from the right of the visible sidebox.
You need to either reduce the size of the image, or reduce the size of the padding (or take it off altogether since you don't need horizontal padding if you are also centering).
Re: Admin-Editable Sidebox - Support Thread
Quote:
Originally Posted by
AdamTOW
Folks,
I have an editable sidebox and through define page manager I am trying the following code:
<?php
// Important! You have to include it before your html code
include_once "/home/nutrili/public_html/shoppoll/poll_cookie.php";
?>
<html>
<body>
<?php
include_once "/home/nutrili/public_html/shoppoll/booth.php";
echo $php_poll->poll_process(5);
?>
</body>
</html>
The only thing that appears in the sidebox is poll_process(5);
But when I use this code in say Page 2 the poll shows up fine. Obviously there is a conflict in the code I am using in a sidebox area.
How can I adjust the code above and get the poll to work?
Thanks in advance.
You can't easily (if at all) insert php code through the define pages manager. It's designed as an easy way in inserting HTML, and most likely your php is being stripped out leaving only the raw text which is displayed.
I'm guessing that your site also has trouble copying with the way in which you have added a whole mini page in this one box with its own html and body tags. Zen Cart already inserts these for every page. They shouldn't be repeated.
To add php to a sidebox, the blank sidebox mod would be a better option.
Re: Admin-Editable Sidebox - Support Thread
Kuroi,
I think you nailed the problem.
To make the image smaller would result in less quality, so I would rather remove the horizontal padding.
Now, how do I do this without affecting the other sideboxes?
Thanks.
Re: Admin-Editable Sidebox - Support Thread
Quote:
Originally Posted by
ckosloff
To make the image smaller would result in less quality, so I would rather remove the horizontal padding.
Now, how do I do this without affecting the other sideboxes?
Something very similar to what you tried previously when you set the padding to 0, but without seeing the site it's not possible to diagnose why this isn't working for you.
Re: Admin-Editable Sidebox - Support Thread
Kuroi,
Thanks for quick answer.
I will have to repost on this later on.
Reason being that it is not possible for me to put online the new version of the site for now, some sections are dependent on others, which are still unfinished.
Re: Admin-Editable Sidebox - Support Thread
Thanks for that.
I will try the blank sidebox.
Re: Admin-Editable Sidebox - Support Thread
HI,
because zen cart lacks a proper plugin system I am trying to use the override system where ever possible to protect my upgrades when zen cart is updated.
I have tried putting editable sidebox in all the appropiate overrides folders (shown below). the sidebox appears and can be turned on and off etc , but the editable page does not appear in the defines page.
If I install as it is in the package this sidebox all works as it should.
is there some code i need to change or will these sideboxes not work like that.
I have also tried the fix mentioned at the begging of the thread which did not work.
includes\languages\english\extra_definitions\CUSTOM\editable_sidebox_defines.php
includes\languages\english\html_includes\CUSTOM\define_editable_sidebox_content. php
includes\modules\sideboxes\CUSTOM\editable_sidebox.php
includes\templates\CUSTOM\sideboxes\tpl_editable_sidebox.php
Any help would be appreciated.
Shoulders
Re: Admin-Editable Sidebox - Support Thread
@shoulders
To over-ride some files there needs to be a file to be over-ridden. Some of the files in this package fall into this category and since there are no equivalents to them in the core Zen Cart code, Zen Cart doesn't know to go looking in your over-rides folder.
However, this is open source software, so if you wish to design a new way of installing the mod that works as effectively as the one in the installation instructions, then you are very welcome and I look forward to hearing more about it.