Page 1 of 1

Updated-Theme Simple Parallax [UNCONFIRMED THEME - resolving issues]

Posted: Sun Dec 04, 2016 7:21 am
by wdq
Ok so here it is a simple Parallax theme

Image

In index.php go to lines 83 till 89 looks like

Code: Select all

if (self::$loggedIn) {
			if (empty($content)) $content = 'Empty content (this text is visible only the admin).';
			if (empty($subside)) $subside = 'Empty content (this text is visible only the admin).';
			$content = self::editable('content', $content);
			$subside = self::editable('subside', $subside);
		}
		list($content, $subside) = self::hook('editable', $content, $subside);
Delete AND ADD this lines

Code: Select all

if (self::$loggedIn) {
			if (empty($content)) $content = 'Empty content (this text is visible only the admin).';
			if (empty($subside)) $subside = 'Empty content (this text is visible only the admin).';
		if (empty($subside2)) $subside2 = 'Empty content (this text is visible only the admin).';
		if (empty($subside3)) $subside3 = 'Empty content (this text is visible only the admin).';
		if (empty($subside4)) $subside4 = 'Empty content (this text is visible only the admin).';
		if (empty($subside5)) $subside5 = 'Empty content (this text is visible only the admin).';
			$content = self::editable('content', $content);
			$subside = self::editable('subside', $subside);
			$subside2 = self::editable('subside2', $subside2);
			$subside3 = self::editable('subside3', $subside3);
			$subside4 = self::editable('subside4', $subside4);
			$subside5 = self::editable('subside5', $subside5);
		}
		list($content, $subside, $subside2, $subside3, $subside4, $subside5)= self::hook('editable', $content, $subside, $subside2, $subside3, $subside4, $subside5);

Then in theme.php you can edit the buttons names how you like it by changing

Code: Select all

<ul>
			<li><a href="#desc">Start</a></li>
			<li><a href="#about">About</a></li>
			<li><a href="#Services">Services</a></li>
			<li><a href="#Social">Social</a></li>
			<li><a href="#Contact">Contact</a></li>
			</ul>
Change the ones without the hashtag

Re: Updated-Theme Simple Parallax

Posted: Sun Dec 04, 2016 11:42 pm
by wiz
Hello wdk and thank you for your awesome contribution! Welcome to the forum.

However, each time an user will update their WonderCMS installation - which is mainly just the index.php, unknown errors and weird behaviour will surely occur, as the index.php won't have your edits, which are required by your theme.

I strongly suggest not editing the index.php file, as it causes future WonderCMS compatibility issues.
You can include your functionality in a new functions.php file, which gets included by itself once you create it.

I will currently mark this thread title as [UNCONFIRMED THEME - resolving issues], until this problem gets addressed.

Once again thank you, hope you enjoy your stay. :)

Re: Updated-Theme Simple Parallax [UNCONFIRMED THEME - resolving issues]

Posted: Mon Dec 05, 2016 12:43 am
by wiz
Please make a pull request with your theme folder over on the WonderCMS themes GitHub.

Re: Updated-Theme Simple Parallax [UNCONFIRMED THEME - resolving issues]

Posted: Tue Dec 13, 2016 8:43 am
by wdq
Hope you will like all the changes.

All issues had had been resolved , upped on github!