[SOLVED] Onepager Theme

User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: [SOLVED] Onepager Theme

Post by turboblack »

it's better to move away from the old way of entering the page, although it looks nice, now the user enters his page through the login URL

by the way, I was able to log in directly through the site and not through the lokalku, this method works, although I do not like the button below), but this is your copyright that either change or alter, so ...

Still I want to draw your attention to the style file, in which most styles are not used, Internet statistics show that they are almost 70%, I had an excellent tool that eliminates unused styles, but unfortunately it was lost along with the previous computer :(

even on the lokalke, I have an error in the line of the template 118 that is associated with the plugin of additional contents.
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: [SOLVED] Onepager Theme

Post by wiz »

Nion, you can add this to your theme.php and it will show the login form IF the current page matches the login URL.

Code: Select all

<?php if (wCMS::$currentPage == wCMS::get('config', 'login')) : ?>
	<form action="<?php wCMS::url(wCMS::get('config', 'login'))?>" method="post"><div class="input-group"><input type="password" class="form-control" id="password" name="password"><span class="input-group-btn"><button type="submit" class="btn btn-info">Login</button></span></div></form>
<?php endif; ?>
nion
Posts: 16
Joined: Thu Nov 02, 2017 10:32 am

Re: [SOLVED] Onepager Theme

Post by nion »

Thank you!
So I updatetd the theme.php on github and it should work now

@turboblack
Still I want to draw your attention to the style file, in which most styles are not used, Internet statistics show that they are almost 70%, I had an excellent tool that eliminates unused styles, but unfortunately it was lost along with the previous computer :(
I changed the Bootsrap color etc, so if you use some bootstrap section how i descriped in a post before, perhaps you will use the styles, i hope you understand what i mean.
even on the lokalke, I have an error in the line of the template 118 that is associated with the plugin of additional contents.
What Kind of error?
Greets
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: [SOLVED] Onepager Theme

Post by turboblack »

localhost gives me an error 118 line associated with the plugin
now its 121
and hosting notices do not show, everything is fine on the server, maybe it does not mean anything, but nevertheless.
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
nion
Posts: 16
Joined: Thu Nov 02, 2017 10:32 am

Re: [SOLVED] Onepager Theme

Post by nion »

I removed The "class" variable on line 121, perhaps it was the thing which give you the error

Code: Select all

class="<?php print $class; ?>"
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: [SOLVED] Onepager Theme

Post by turboblack »

Notice: Undefined property: stdClass::$addition_content_3 in C:\xampp\htdocs\wcms232\themes\oner-master\theme.php on line 121

till now he is

I removed this is all, because in this template, this plugin "addition contents" is simply not needed, and the problem was solved)))

Code: Select all

                	  <?php
                		for ($i=1; $i!=10; $i++) {
                		    $numberOfContent = "addition_content_".$i;
                		    $fetch = $page->$numberOfContent;
                	        $addition_content = $fetch;
            			    if (empty($addition_content)) {
            			        // do something if the additional content doesn't exist, maybe don't
                			} else { ?>
                    			<div class="col-md-12" data-target="pages" id="<?php print $numberOfContent; ?>"><?=$fetch;?></div>
                		    <?php
                			}
                		}
                	?>
but it's too stupid way, although working)))
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: [SOLVED] Onepager Theme

Post by wiz »

Nion, I think you will be needing that line in the code, be sure to check everything works on your website.
nion
Posts: 16
Joined: Thu Nov 02, 2017 10:32 am

Re: [SOLVED] Onepager Theme

Post by nion »

wiz wrote: Tue Nov 28, 2017 12:17 am Nion, I think you will be needing that line in the code, be sure to check everything works on your website.
I don't think so, the class get the "editable" to the content.
In the Admin section, it doesn't work with the onepager theme it use the <?=wCMS::page('content')?> function.
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: [SOLVED] Onepager Theme

Post by wiz »

Nion, everything looks good! Can you make a release file on GitHub? The theme will then be added to wondercms.com/themes

Let me know if you need any help with creating a release.
- example of how of WonderCMS theme releases: https://github.com/robiso/wondercms-themes/releases
- you can click draft release here: https://github.com/niondevelop/oner/releases (UIP your theme folder and upload it)
nion
Posts: 16
Joined: Thu Nov 02, 2017 10:32 am

Re: [SOLVED] Onepager Theme

Post by nion »

Hi wiz

since the update there is a problem with the 404 page.
I get the DB entries with:

Code: Select all

<?php foreach ( wCMS::db()->pages as $pageName => $page ): ?> <!-- loop though all pages -->
Now you add the new feature with the 404 page, thats "hidden" db entrie in the page.
So my small snippets get also the 404 page.
So i have to add somthing like a filter, do you have an idea?

greets
Post Reply