Page 1 of 1

html, php from panel, documentation

Posted: 24 Jan 2017, 09:58
by clicketyclick
Hello - 

I'm testing out your gallery, and have a few questions.  
  1. Is there any documentation to refer to, or are questions like this for the forum?
  2. Can you create more pages like the index which isn't a gallery, but can hold information about what I do?
  3.  Is there a way from the panel to edit the html/php source?
  4. Is it possible for me to use php includes for things like my header and footer?
Thanks for your help
Dale

Re: html, php from panel, documentation

Posted: 24 Jan 2017, 10:57
by mjau-mjau
clicketyclick wrote:Is there any documentation to refer to, or are questions like this for the forum?
We will be extending documentation, but for now, there is the HELP (?) links in panel (which is quite extensive), and the forums.
clicketyclick wrote:Can you create more pages like the index which isn't a gallery, but can hold information about what I do?
You can create as many pages as you like, and they don't have to be "galleries". Each X3 page has a CONTENT section, where you can add any custom html, plain text, or use built-in content plugins. In our showcase section, you will find several websites with pages that are not galleries.
clicketyclick wrote:Is there a way from the panel to edit the html/php source?
Each X3 page has a CONTENT section, where you can add ANY html to the page content. You cannot include PHP into the content section, but may I ask what it is you intend to do?
Image
clicketyclick wrote:Is it possible for me to use php includes for things like my header and footer?
The header and footer are already GLOBAL elements, which are configured with custom html and can be styled with CSS. You cannot include PHP into the footer or header, but may I ask what you intended to do so I have an idea?

Re: html, php from panel, documentation

Posted: 24 Jan 2017, 12:13
by clicketyclick
Hello - Thanks for the quick reply.

Here's are portions of my header that uses php:

  <title><PHP echo $pageTitle ></title>

?php if (stristr($_SERVER["HTTP_USER_AGENT"],'facebook') !== false) { ?>
  <meta content="1234567" name="fb:admins" />
  <meta property="og:title" content="<?PHP echo $pageTitle ?>" />
  <meta property="og:url" content="<?php $url="https://www.".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url;?>" />
  <meta property="og:description" content="<?PHP echo $pageDescription;?>" />
  <meta property="og:type" content="website" />
<?php } ?


PHP include ($_SERVER['DOCUMENT_ROOT'].'/analyticstracking.php'); ?

If its faster/less complicated to run X3 from a subdirectory, then keeping the same header would make updating things much easier if I could attach my existing header, instead of having to edit it in two or more locations.  On the other hand, recreating my entire website to be within X3 seems extremely time consuming, especially since most of my pages include php.

Thanks for your help.

Re: html, php from panel, documentation

Posted: 24 Jan 2017, 12:41
by mjau-mjau
clicketyclick wrote:<title><PHP echo $pageTitle ></title>

?php if (stristr($_SERVER["HTTP_USER_AGENT"],'facebook') !== false) { ?>
  <meta content="514548714" name="fb:admins" />
  <meta property="og:title" content="<?PHP echo $pageTitle ?>" />
  <meta property="og:url" content="<?php $url="https://www.".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url;?>" />
  <meta property="og:description" content="<?PHP echo $pageDescription;?>" />
  <meta property="og:type" content="website" />
<?php } ?
All this is already done by properly by X3. Just check the SOURCE of any of your X3 pages, or the X3 demo. X3 is very "complete".
clicketyclick wrote:PHP include ($_SERVER['DOCUMENT_ROOT'].'/analyticstracking.php'); ?
This also is managed by X3. Just insert your Analytics ID. If you have a custom analytics tracker, it can be triggered easily from custom JS.
clicketyclick wrote:If its faster/less complicated to run X3 from a subdirectory, then keeping the same header would make updating things much easier if I could attach my existing header, instead of having to edit it in two or more locations.  On the other hand, recreating my entire website to be within X3 seems extremely time consuming, especially since most of my pages include php.
You NEVER edit the header or footer in more than one location, as they are GLOBAL, and already part of the X3 template mechanism (which uses PHP).
clicketyclick wrote:On the other hand, recreating my entire website to be within X3 seems extremely time consuming, especially since most of my pages include php.
It seems you have missed crucial points of X3. I don't understand what you are trying to do that isn't already a part of X3, or why it would be time-consuming in any way. You just make a page from panel, and that's it ... X3 already includes all meta tags correctly (based on the page viewed), as well as analytics (if enabled), and header+footer are global elements based on your settings.

Re: html, php from panel, documentation

Posted: 24 Jan 2017, 13:12
by clicketyclick
To explain how I have missed the crucial points of X3, and not to criticise or complain is that there isn't documentation to learn for myself rather than bug you for answers.  I literally hate asking questions in forums and emails, and much prefer to search documentation.  Because of this hate, I have fumbled around for several days, with trial and error on my test install before I came here.  I'm neither needy or a luddite.  I'm just trying to get answers faster than bumbing around on my own.

I'm trying to see how the site I administer fits with X3, basically by trial and error.  If you answer my questions, knowing that they are intended to understand how to merge my site with your gallery, and not trying to reinvent the wheel, we'll both have to type less.  Your forums are a good start, but trying to find the answer to a simple question takes a lot of time, often with no helpful results.  Again, not a criticism, just sharing my experience.

All that said, from an efficiency standpoint, would you suggest the best route is to move all 200+ pages of my site into X3, or run X3 from a subdirectory?

Re: html, php from panel, documentation

Posted: 24 Jan 2017, 23:09
by mjau-mjau
I don't mind answering questions here at all, and I'm more than happy to help. It's just that your questions seem to require that I added some perspective, primarily the fact that you won't normally need to use any PHP include. X3 is already a complete PHP system, where anything that is included, is mostly done in from panel settings. I guess we may have incorrectly conveyed the concept that X3 is a "template", whereas its really a "complete website system" (in lack of better wording), where you don't have to (and shouldn't need to) edit any code (apart from any specific html you want in your pages). Of course, since you speak of PHP includes in the first place, I can clearly understand you have a good understanding of website creation.
clicketyclick wrote:All that said, from an efficiency standpoint, would you suggest the best route is to move all 200+ pages of my site into X3, or run X3 from a subdirectory?
Understanding where you are coming from now, this seems to be a good question. To give a clear answer though, would you be able to provide me a link to your existing website so I can see what it's all about?

Most users would choose to use X3 for their entire website, although there is no technical reason why you couldn't use X3 in a subfolder, as a "gallery" section. Personally, I would recommend using X3 for your entire website. Why? Because it creates a fluid, modern and super-fast website, which is fast and nice to view for the visitor (obviously a subjective opinion, but we wouldn't be working full-time with X3 for 3 years if we didn't think so). Unless you have some very-specific behavior in your current website pages, there is no reason why you can't run everything in X3 ... But if you have a link to your existing website, I can give a clearer answer to that.

Also, if you do choose to use X3 for your entire website, it would not be feasible to expect it to look identical as your current website. X3 is based on a flexible template system (with settings for layouts, skins, colors, fonts and support for custom  CSS styling). You would likely be able to resemble your existing website, but within the template- and style limitations of X3 ... 

Generally speaking, YES I would recommend using X3 for your entire website, but it is not compulsory. If your website has features that can't be implemented into X3, and/or is already modern, beautiful and fast, then the decision becomes quite subjective.

Just as reference, below are links to a few pages created in X3 that are not gallery-oriented. They are all styled differently, within the boundaries of the X3 template. There are no PHP includes, as styles are set globally from X3 panel, and you can make advanced adjustments (for example to header and footer) by using custom CSS.
https://www.photo.gallery/
https://flamepix.com/
http://promolution.ch/
https://alanmacleod.co.uk/
http://www.danielmcpeake.com/

If you go to the X3 demo, click the STYLER button (bottom right "gears" icon), you can select dozens of style combinations to see what the flexible X3 template is basically capable of.
Image

Re: html, php from panel, documentation

Posted: 25 Jan 2017, 15:53
by clicketyclick
Hello -
Thanks for your explanations.  I feel much better that we are on the same page now.

I have two sites I am considering X3 for.  Once I figure it out, I want to do the smaller one first, for obvious reasons.

For the larger one, I have about 1/2 million photos, organized into directories, subdirectories, and sometimes even sub-sub directories.  For that one, is there an easy way to use the existing folder structure, or will I have to create galleries (or folders - still not clear about the difference) in X3 and copy files into them?

I'll pm you the two sites.  As I work on them, I'm breaking them, and don't want any added visitors until I have everything sorted.

Thanks mjau-mjau,
Dale

Re: html, php from panel, documentation

Posted: 26 Jan 2017, 03:16
by mjau-mjau
clicketyclick wrote:I have two sites I am considering X3 for.  Once I figure it out, I want to do the smaller one first, for obvious reasons.
See PM for recommendations.
clicketyclick wrote:For the larger one, I have about 1/2 million photos, organized into directories, subdirectories, and sometimes even sub-sub directories.  For that one, is there an easy way to use the existing folder structure, or will I have to create galleries (or folders - still not clear about the difference) in X3 and copy files into them?
Are the gallery-folders already sorted into a physical folder structure? That would work in X3 ... the only issue is that X3 uses a folder-naming scheme "1.first", "2.second" etc, where the number defines the SORT order of the page/folder. Until a folder is numbered, it is considered "invisible" to the X3 menu, although it will still be accessible by direct link. Numbers are excluded from the URL and TITLE (1.first becomes "first" /first/).

You would probably need to run a simple script to NAME your folders with a number first (NUMBER.foldername).

Re: html, php from panel, documentation

Posted: 26 Jan 2017, 09:29
by clicketyclick
Thanks Karl -
I do have the folder structure I want, so that's great news. I'm currently trying to figure out how to make a 2 column page for my main page, and am assuming I have to create a new theme, so I'm off doing that.  Hopefully that will give you a rest from my questions.

I do have one suggestion for you.  So many scripts of all kinds (not just photo galleries) are not compatible with PHP 7.  I think the fact that yours is should be mentioned loudly, and probably on your main page.  That's a huge plus that is either not mentioned here, or not prominently displayed.  Not my business, but thought it might help.

Dale

Re: html, php from panel, documentation

Posted: 26 Jan 2017, 09:50
by mjau-mjau
clicketyclick wrote:I do have the folder structure I want, so that's great news. I'm currently trying to figure out how to make a 2 column page for my main page, and am assuming I have to create a new theme, so I'm off doing that.  Hopefully that will give you a rest from my questions.
I am not 100% sure what you mean by "new theme" in this context ... X3 already has robust GRID system available for the page CONTENT.
Image

For example, the below creates two columns (from a 12-column grid system):
Code
<div class="row">
  <div class="medium-6 columns">
    <img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.6/assets/svg/1f98e.svg" alt="lizard">
  </div>
  <div class="medium-6 columns">
    <img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.6/assets/svg/1f98e.svg" alt="lizard">
  </div>
</div>
We use Foundation Grid, which you can read more about here:
http://foundation.zurb.com/sites/docs/v ... /grid.html

The grid itself will take as much space as you set the CONTEXT module width to (which when set at "wide", will take 100% browser width). My point being, you can build complex html structures directly into pages.
clicketyclick wrote:I do have one suggestion for you.  So many scripts of all kinds (not just photo galleries) are not compatible with PHP 7.  I think the fact that yours is should be mentioned loudly, and probably on your main page.  That's a huge plus that is either not mentioned here, or not prominently displayed.  Not my business, but thought it might help.
Yes thanks, we listen to ALL suggestions from customers. Personally I would expect it to be granted to work on new PHP versions if it is a premium script like X3.