An option to choose wallpapers and images as background of forum.

Spartak

Well-known member
Member
Joined
9 yrs. 9 mth. 5 days
Messages
587
Reaction score
8,878
Wallet
0$
An option to choose wallpapers and images as background of forum.

In this tutorial I will show you how can you and your forum members save a image as their forum background with an stylish view. <br />
<br />
1. 1st download the attachment file what i has given below in attachment and extract that , and then go to your root/images folder , then creat folder naming "js" upload files into your root <span style="font-weight: bold;" class="mycode_b"><span style="font-style: italic;" class="mycode_i">images</span></span><span style="font-weight: bold;" class="mycode_b"><span style="font-style: italic;" class="mycode_i">/js/ </span></span>flolder.<br />
<br />
1.a:  download the <a href="
Please, Log in or Register to view URLs content!
" target="_blank" rel="noopener" class="mycode_url">background.zip</a> folder , and extract that and then go to your root/imges folder creat a folder naming "<span style="font-weight: bold;" class="mycode_b"><span style="font-style: italic;" class="mycode_i">bg"</span></span>  and then upload that file to it.<br />
<br />
<br />
2. 2nd just copy this css codes and paste it in the global.css at the last.<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">/** start **/
.semiwrap {
    width: 85%;
    margin: auto;
}
@media(max-width: 540px) {
.hide-540px {
    display: none !important;
  };
}
@media(max-width: 540px) {
.show-540px {
display: block !important;
};
}
@media(min-width: 541px) {

.show-540px {
display: none !important;
};
}

.bg_style {
    float: right;
    cursor: pointer;
    margin-left: 10px;
color: #B0ADAD !important;
font-size: 17px;
}
.bg_style:hover {
color: #FFF !important;
text-decoration: none;
  transition: all 0.5s ease;
}

.ribbon:before {
    content: '';
    width: 0; height: 0;
    border-style: solid;
    border-width: 5px 5px;
    border-color: #B9B9B9 #B9B9B9 transparent transparent;
    position: absolute; left: 0; top: 28px;
}
.ribbon:after {
    content: '';
    width: 0; height: 0;
    border-style: solid;
    border-width: 5px 5px;
    border-color: #B9B9B9 transparent transparent #B9B9B9;
    position: absolute; right: 0; top: 28px;
}

/*** Background Picker style ***/
.fixed_bg {
background-size: cover !important;
}
.bg_preview:before,.bg_preview:after {
    content:&quot; &quot;;
    display:table
}
.bg_preview:after{
    clear:both
}
.bg_preview {
    display: none;
    border: 1px solid #DADADA;
    background: #FFF;
    padding: 5px !important;
    width: 300px;
    height: auto;
    z-index: 999;
    float: right;
    position: absolute;
    right: 150px;
}
.bg_preview a {
    float: left;
    width: 50px;
    height: 50px;
    box-sizing: border-box;
    margin: 1%;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #CECECE;
    cursor: pointer;
}

.bg_preview a:hover {
border: 2px solid #50EC00
}

.bg_more {
display: none;
    width: 50px;
    cursor: pointer;
    background: #FFF;
    color: #00E192;
    text-align: center;
    border-radius: 2px;
}

.bg_preview_more {
    display: none;
}
.bg_preview_more:before,.bg_preview_more:after {
    content:&quot; &quot;;
    display:table
}
.bg_preview_more:after{
    clear:both
}

.bg_preview_more a {
    float: left;
    width: 18%;
    height: 80px;
    box-sizing: border-box;
    margin: 1%;
    display: inline-block;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-size: cover;
    border: 2px solid #CECECE;
}

.bg_preview_more a:hover {
border: 2px solid #50EC00
}
/** end **/
</code></pre><br />
find in global.css #content id<br />
<br />
and remove the line<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">background: #fff;</code></pre><br />
<br />
3. after all these work go to you headerinclude template and click edit. the paste this code at the end of the template.<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;script type=&quot;text/javascript&quot; src=&quot;{$mybb-&gt;settings['bburl']}/images/js/flow.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{$mybb-&gt;settings['bburl']}/images/js/cookie.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{$mybb-&gt;settings['bburl']}/images/js/tipsy.js&quot;&gt;&lt;/script&gt;</code></pre><br />
After all this stuff the main work is in header template. Come to the header template then click edit.<br />
<br />
notice :- if you are using mybb default theme then it would be easy to get it clear and smooth. Well i am using default theme so as i have done , i am telling that trick what i have done in my forum.  <img src="
Please, Log in or Register to view URLs content!
" alt="Big Grin" title="Big Grin" class="smilie smilie_5" /><br />
<br />
then in header template remove all the codes and paste this codes as given below. <br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;div id=&quot;container&quot;&gt;
&lt;a name=&quot;top&quot; id=&quot;top&quot;&gt;&lt;/a&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;div id=&quot;logo&quot;&gt;
&lt;div class=&quot;wrapper&quot;&gt;
&lt;a href=&quot;{$mybb-&gt;settings['bburl']}/index.php&quot;&gt;&lt;img src=&quot;{$theme['logo']}&quot; alt=&quot;{$mybb-&gt;settings['bbname']}&quot; title=&quot;{$mybb-&gt;settings['bbname']}&quot;/&gt;&lt;/a&gt;
&lt;ul class=&quot;menu top_links&quot;&gt;
{$menu_portal}
{$menu_search}
{$menu_memberlist}
{$menu_calendar}
&lt;li&gt;&lt;a href=&quot;{$mybb-&gt;settings['bburl']}/misc.php?action=help&quot; class=&quot;help&quot;&gt;{$lang-&gt;toplinks_help}&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div id=&quot;panel&quot;&gt;
&lt;div class=&quot;upper&quot;&gt;
&lt;div class=&quot;semiwrap&quot;&gt; &lt;span style=&quot;float: right; cursor: default;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;a class=&quot;bg_style&quot; title=&quot;Change The Background Of Theme&quot;&gt;&lt;i class=&quot;fa fa-picture-o&quot;&gt; Change Background &lt;/i&gt;&lt;/a&gt;
{$welcomeblock}
&lt;div class=&quot;bg_preview&quot;&gt;&lt;div class=&quot;ribbon&quot;&gt;&lt;b&gt;Theme Customizer&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-top: 100px; margin-bottom: 15px;text-align: center;&quot;&gt;&lt;b&gt;Background Patterns&lt;/b&gt;&lt;/div&gt;
                           &lt;div style=&quot;margin-left: 8px;&quot;&gt;
&lt;a id=&quot;images/bg/backgrounds/bg1.png&quot; style=&quot;background: url('images/bg/backgrounds/bg1.png')&quot; class=&quot;bg_n&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg2.png&quot; style=&quot;background: url('images/bg/backgrounds/bg2.png');&quot; class=&quot;bg_n&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg3.png&quot; style=&quot;background: url('images/bg/backgrounds/bg3.png');&quot; class=&quot;bg_n&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg4.png&quot; style=&quot;background: url('images/bg/backgrounds/bg4.png');&quot; class=&quot;bg_n&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg5.png&quot; style=&quot;background: url('images/bg/backgrounds/bg5.png');&quot; class=&quot;bg_n&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-top: 100px; margin-bottom: 15px;text-align: center;&quot;&gt;&lt;b&gt;Background Images&lt;/b&gt;&lt;/div&gt;
    &lt;div style=&quot;margin-left: 8px;&quot;&gt;
&lt;a id=&quot;images/bg/backgrounds/bg6.jpg&quot; style=&quot;background: url('images/bg/backgrounds/bg6.jpg');&quot; class=&quot;fixed_bg&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg7.jpg&quot; style=&quot;background: url('images/bg/backgrounds/bg7.jpg');&quot; class=&quot;fixed_bg&quot;&gt;&lt;/a&gt;
    &lt;a id=&quot;images/bg/backgrounds/bg8.jpg&quot; style=&quot;background: url('images/bg/backgrounds/bg8.jpg');&quot; class=&quot;fixed_bg&quot;&gt;&lt;/a&gt;
    &lt;a id=&quot;images/bg/backgrounds/bg9.jpg&quot; style=&quot;background: url('images/bg/backgrounds/bg9.jpg');&quot; class=&quot;fixed_bg&quot;&gt;&lt;/a&gt;
                            &lt;a id=&quot;images/bg/backgrounds/bg10.jpg&quot; style=&quot;background: url('images/bg/backgrounds/bg10.jpg');&quot; class=&quot;fixed_bg&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-top: 100px; margin-bottom: 15px;text-align: center;&quot;&gt;&lt;b&gt;Custom Background&lt;/b&gt;&lt;/div&gt;
&lt;input type=&quot;text&quot; id=&quot;url&quot; value=&quot;&quot; placeholder=&quot;Put URL of your Background...&quot; class=&quot;urlimage&quot; /&gt;
&lt;input type=&quot;button&quot; value=&quot;Update&quot; class=&quot;button&quot; onclick=&quot;updateURL()&quot; /&gt;
&lt;p&gt;&lt;i style=&quot;font-size: 15px;&quot; class=&quot;fa fa-picture-o&quot;&gt;&lt;/i&gt; Above URL is an Image &lt;i class=&quot;fa fa-check-square clickedimage&quot; style=&quot;cursor: pointer; font-size: 18px;&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-square-o unclickedimage&quot; style=&quot;cursor: pointer; font-size: 18px;&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/center&gt;
&lt;/div&gt;
&lt;!-- &lt;/div&gt; in header_welcomeblock_member and header_welcomeblock_guest --&gt;
&lt;!-- &lt;/div&gt; in header_welcomeblock_member and header_welcomeblock_guest --&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;
&lt;div class=&quot;wrapper&quot;&gt;
{$pm_notice}
{$remote_avatar_notice}
{$bannedwarning}
{$bbclosedwarning}
{$modnotice}
{$pending_joinrequests}
{$awaitingusers}
&lt;navigation&gt;
&lt;br /&gt;</code></pre><br />
Preview :- <br />
<img src="
Please, Log in or Register to view URLs content!
" data-original-url="https://i.ibb.co/C5SSnF4/Screenshot-2020-10-26-09-23-49-488-com-android-chrome.jpg" loading="lazy" alt="[Image: Screenshot-2020-10-26-09-23-49-488-com-a...chrome.jpg]" class="mycode_img" /><br />
<hr class="mycode_hr" />
Resources taken from :- <a href="
Please, Log in or Register to view URLs content!
" target="_blank" rel="noopener" class="mycode_url">HRM</a>'s <a href="
Please, Log in or Register to view URLs content!
" target="_blank" rel="noopener" class="mycode_url">Flow Theme</a> .<br />
<br />
Edited: something was wrong , i have edited. Now You can try.<br />
<br />
Notice :- If any error occurring regarding this then pm me or mention here... i will be glad to help you. ☺<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="
Please, Log in or Register to view URLs content!
" title="Zip File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=43413" target="_blank" title="">js.zip</a> (Size: 6.57 KB / Downloads: 49)
<!-- end: postbit_attachments_attachment -->


Please, Log in or Register to view URLs content!
 
Top Bottom