3.1.x Extensions Database 3.1 / 3.2Switches

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
Previous topicNext topic
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6485
Joined: Jan 13th, '14, 20:45
    Linux Chrome

Switches

Post by dmzx »

Extension Name: Switches
Author: dmzx

Special thanks to: martin

Extension Description:
This extension will add some switches.

dmzx/Switches

Screenshot:
None

3.3 version can be found here Switches
Extension Download:
Download-link
Switches v1.0.0
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `switches`.
  3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
  4. Copy the `switches` folder to `/ext/dmzx/` if done correctly, you'll have the main extension class at (your forum root)/ext/dmzx/switches/composer.json
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Switches` under the Disabled Extensions list, and click its `Enable` link.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5123
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Switches

Post by martin »

Screenshot
22.png
Example of html code should look like

Code: Select all

<!-- IF SWITCHES_ENABLE_FIRST -->
<div style="position: absolute; margin: -12px 0 0 -48px ">
    <img src="{ROOT_PATH}images/cornerhatbig.png" alt="Santa hat" />
</div>
<!-- ENDIF -->
note the <!-- IF SWITCHES_ENABLE_FIRST --> in the code and image ?
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

nelflucifer
Users
Users
Status: Offline
User theme: Dark
Posts: 70
Joined: Jan 3rd, '16, 11:24
    Windows 7 Opera

Re: Switches

Post by nelflucifer »

Russian ru.zip
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Last edited by nelflucifer on Jan 25th, '16, 09:32, edited 1 time in total.
Image
Learn to read people's thoughts, not forgetting about their.
The extension translate from English to Russian...
English Forums
Available 251 extension with translation into Russian language...

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Helios
Users
Users
Status: Offline
User theme: Dark
Posts: 14
Joined: Sep 27th, '15, 22:27
    Windows 7 Firefox

Re: Switches

Post by Helios »

Italian language
it.zip
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5123
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Switches

Post by martin »

Updated to work on 3.3
Screenshot from 2020-12-27 16-45-52.png
dmzx_switches_1_0_0.zip

Code: Select all

{% if SWITCHES_ENABLE_FIRST %}
<div style="position: absolute; margin: -12px 0 0 -48px ">
    <img src="{ROOT_PATH}images/cornerhatbig.png" alt="Santa hat" />
</div>
{% endif %}
or you can do it this way

Code: Select all

{% if SWITCHES_ENABLE_FIRST %}
<div id="hat1"></div>
{% endif %}
and put css in a css file

Code: Select all

position: absolute; 
margin: -12px 0 0 -48px;
background-image: url(images/cornerhatbig.png alt="Santa hat");
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

Previous topicNext topic