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

Post Reply
wdq
Posts: 9
Joined: Fri Dec 02, 2016 11:44 pm

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

Post 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
Attachments
parallaxv1.0.0.zip
(233.76 KiB) Downloaded 554 times
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Updated-Theme Simple Parallax

Post 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. :)
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

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

Post by wiz »

Please make a pull request with your theme folder over on the WonderCMS themes GitHub.
wdq
Posts: 9
Joined: Fri Dec 02, 2016 11:44 pm

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

Post by wdq »

Hope you will like all the changes.

All issues had had been resolved , upped on github!
Post Reply