Own style demo

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Anti-Spam Guide
Post Reply
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Own style demo

Post by OlaNorway »

Hi.
I run the 3.1.10 version of phpBB.
In the old days you could make a style demo yourself.
I remember I downloaded the code from the net.
I am looking for the code snipped required to make my own style demo.
It had a dropdown list on the upper right side for choosing styles.
And the forum would change tom that style.
I remember I had to hack 2-3 lines of code to get it to work.
That was most likely the 2x version.
Is this possible in 3.x version?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Own style demo

Post by david63 »

Perhaps not quite what you are looking for but there is the Quick Style extension
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

david63 wrote: Fri Jun 09, 2017 11:39 am Perhaps not quite what you are looking for but there is the Quick Style extension
Adds a drop-down selector to the header, which detects a selection change and triggers a board style change through the UCP.
Automatically redirects back to the original page being viewed after style has changed.
Works for guests too, but uses a special cookie instead.
Hmmm, thanks for the tip.
I'll test it.
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

OlaNorway wrote: Fri Jun 09, 2017 12:14 pm I'll test it.
Hmmm, did not work.
I even purged the cache in admin.
OK, need to figure this out.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Own style demo

Post by david63 »

OlaNorway wrote: Fri Jun 09, 2017 12:34 pm did not work.
I don't know what you have done wrong but it definitely works with both 3.1 and 3.2 - I use it all the time
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

Looking at this thread, I can call it, but it need to be global and not per style:
viewtopic.php?f=456&t=2237216

Can I inject this in the header or footer independent of styles?
You can put <!-- EVENT quickstyle_event --> anywhere in your template to display the style switcher.
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

Can I use <!-- EVENT overall_header_body_before --> ? to add to all styles?
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

Hmmm, tried it on another installation of phpBB.
Not working there either.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Own style demo

Post by stevemaury »

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
Ibedejo
Registered User
Posts: 243
Joined: Tue Feb 21, 2012 12:12 am

Re: Own style demo

Post by Ibedejo »

What does "did not work" mean?
You need to have at least one further style, in addition to prosilver, installed and active for the dropdown to be displayed.
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

Somehow it works now.
Upped the ext. to a new installation and enabled it.
Got the error msg below and did a F5 refresh.
I upped a lot of styles, not all of them 3.1.10, but some earlier 3.1.x on another installation.
I did a re-up to a new installation with only the listed installed styles
in ACP from the old installation and installed them.
Can this have anything to do with his?

From support group post:
phpBB v3.1.10
Quick Style v1.3.5

Upped the extention and enabled it.
Got the msg below.
Did a refresh (F5) and it was gone.

Error msg:
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/di/container_builder.php on line 138: require([ROOT]/cache/container_64cd73d669dd8f337d8b1b251fc6bd39.php): failed to open stream: No such file or directory

Fatal error: require(): Failed opening required './../cache/container_64cd73d669dd8f337d8b1b251fc6bd39.php' (include_path='.:/usr/share/php5/') in /mounted-storage/home114c/sub009/sc19806-FFHE/sundgot_net_phpbbstyles/phpbb/phpbb/di/container_builder.php on line 138
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

I chose to delete the files and the database and do a fresh install with new uploaded 3.1.10 files.
I added the styles I knew would work and the extension.
So now it is fine.
If it will be knocked out of something I do not know.
So we will see I guess.
It could be a extension or style maybe?
OlaNorway
Registered User
Posts: 25
Joined: Fri Jun 09, 2017 10:55 am

Re: Own style demo

Post by OlaNorway »

LOL, now I know the answer to the did not work.
Jeeez, how stupid of me.

Under tab "General" and "Board settings":
Override user style: has to be set to _NO_.
Replaces user’s (and guest’s) style with the style as defined under "Default style".
Post Reply

Return to “Extension Requests”