SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

Shades.

Quote from: Bigguy on November 11, 2020, 03:26:48 PM
Maybe your DNS cache needs clearing.
Ok i tried this and everything else I could think of and rebooted and still cant access that link! Does anybody have a copy they can PM me?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shambles


Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

oblio2007

There is a custom block to show all sticky threads from specified boards ?
Thank You!

Sono

I wonder if anyone could help me with this:

I am trying to implement an Adsense code into my site. I have Simpleportal installed. I am trying to place the Adsense code into a Simpleportal Top block. For this, I created a custom HTML block, and set it to appear in the TOP block. Unfortunately, the result is that the banner is not aligned properly. I set it to be centered, but the banner appears slightly off centered. The first element in the hierarchy that the Adsense script creates (<ins class="adsbygoogle") is in the proper position that I set for it. However, all child elements are out of position. You can see it on the first two photos I attached (offc1 offc2). Interestingly, however, when I place the same code to a Simple Portal Header block, the banner will be properly aligned. See the third photo attached (offc3).

Does anyone have an idea why the code doesn't work correctly in the Top block?

So here are the photos and my code:

<div style="text-align:center;margin-bottom:10px;">
<div style="
    max-width:729px;
    display:block;margin-left:auto;margin-right:auto;
    text-align: center;">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block;height:110px;"
     data-ad-client="xxxxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxxxxxxxx"
     data-ad-format="horizontal"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>



SilverKnight

Does anyone have a recent posts php module with Split Forum Mod support?

Chen Zhen

@Sono:
I assume you mean vertically & horizontally centered?
Perhaps you have left & right blocks causing top blocks to be more narrow than the header blocks?
Maybe use a percentage for the max-width & hide the overflow.

Try this example (adjust max-width to your preference):

<div style="max-width:90%;overflow: hidden;display:block;margin: 0 auto;text-align: center;">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display: block;height: 110px;"
     data-ad-client="xxxxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxxxxxxxx"
     data-ad-format="horizontal"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

SilverKnight

I want a block to only appear on a custom action but the syntax i am unsure of.

Under advanced options inside  display options, i want a block to only show when visiting the following action with the value:

index.php?action=forum;c=3

Anyone know what would be the correct syntax for this?

Chen Zhen


Edit the block and click (enable) the "Advanced Options" checkbox.
Ensure that no options have been checked within "Select Actions" & "Select Boards".

Enter this in the custom display options:
~c|3, -~action|forum

Save the block, test it and then let me know if it worked as expected.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


@SilverKnight:
What I previously posted will actually allow the block to be viewed if c=3 for any action which if I understand correctly is not what you are after.

Multiple conditions added to a single action to view the block do not appear to be possible by default.
However, I just created a plugin to do just that.

Download & install this Simple Portal plug-in:
https://web-develop.ca/index.php?action=downloads;area=stable_simple_portal_plugins;file=86




Edit the block and click (enable) the "Advanced Options" checkbox.
Ensure that no options have been checked within "Select Actions" & "Select Boards".

Enter this in the custom display options:
~action|forum, &c|3


... you can add additional conditions using a comma to separate them and the "&' for each condition. Swap out any "=" from the URL with the "|" character.
The above example input should give you some idea for what to enter in the custom display options.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sono

Quote from: Chen Zhen on December 07, 2020, 06:25:19 PM
@Sono:
I assume you mean vertically & horizontally centered?
Perhaps you have left & right blocks causing top blocks to be more narrow than the header blocks?
Maybe use a percentage for the max-width & hide the overflow.

Try this example (adjust max-width to your preference):

<div style="max-width:90%;overflow: hidden;display:block;margin: 0 auto;text-align: center;">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display: block;height: 110px;"
     data-ad-client="xxxxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxxxxxxxx"
     data-ad-format="horizontal"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>


We have investigated this since then in the Google Adsense forum. The Google script has a glitch, when you insert it in table circumstance, like when you place it in the Top Block that Simple Portal installs, it gets confused, and does not align the banners properly. You have to add: "border-collapse:collapse;" to its style and limit the banner size under the minimum width of the Top Block or page size, so that the banner alignment would function properly.

chyyyone

I'm using Simple Portal 2.3.7 on SMF 2.0.17 with the Fumes theme.

I am no longer going to use the Title on Simple Portal because I made my own and put the code in the body on portal so I would like to round the top corners of the default body class windowbg on Portal if possible. Thanks :)


Chen Zhen


I'm not positive if I understand exactly what you're trying to do but here is an edit that will cause all block containers to have rounded corners.

file: ../Themes/default/css/portal.css

add this code at the very end of the file:

div[class^="sp_block_"] div[class^="windowbg"] span[class^="topslice"] {
display: none;
}
div[class^="sp_block_"] div[class^="windowbg"] span[class^="botslice"] {
displaY: none;
}
div[class^="sp_block_"] div[class^="windowbg"] {
border-radius: 15px 50px;
padding: 10px;
}


You can adjust the border-radius to make the corners appear as you wish.
The padding will likely need to be adjusted depending on your opted border-radius and/or what you prefer.

reference for border-radius:
https://www.w3schools.com/cssref/css3_pr_border-radius.asp

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

chyyyone

Quote from: Chen Zhen on December 30, 2020, 08:57:24 PM

I'm not positive if I understand exactly what you're trying to do but here is an edit that will cause all block containers to have rounded corners.

file: ../Themes/default/css/portal.css

add this code at the very end of the file:

div[class^="sp_block_"] div[class^="windowbg"] span[class^="topslice"] {
display: none;
}
div[class^="sp_block_"] div[class^="windowbg"] span[class^="botslice"] {
displaY: none;
}
div[class^="sp_block_"] div[class^="windowbg"] {
border-radius: 15px 50px;
padding: 10px;
}


You can adjust the border-radius to make the corners appear as you wish.
The padding will likely need to be adjusted depending on your opted border-radius and/or what you prefer.

reference for border-radius:
https://www.w3schools.com/cssref/css3_pr_border-radius.asp [nofollow]


This is what I wanted and it worked. Thank You!

Grammy

Could you guys help me move the SimplePortal copyright (screenshot attached) into the SMF 2.0.17 Default wrapper (index.css/div#wrapper) with all the other copyrights instead of by itself below the wrapper?  It's a brand new test forum, all mods installed easily with no manual editing, no forum errors, so I'm not sure if it's meant to be outside the forum wrapper that way, or it that's a glitch? 

Thanks so much.   :)

Grammy

I lack the permissions to modify or delete the above post, but while clunking around in my site's cosmetics, I managed to sort it.  Thanks, though.   :)

Sir Osis of Liver

Running SP 2.3.7 here in Nightbreeze.  When viewed on phone, left blocks are stacked on top of top blocks.  We want top blocks on top (duh!).  Is that a theme thing or SP thing?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Chen Zhen

Simple Portal was never designed for mobile display.
It uses standard tables and does not contain the appropriate CSS to make it responsive.
I don't know if Sinan intends to update SP at some point to make such changes.

EhPortal (ported from SP after its license was amended) is responsive but only supports the SMF 2.1 branch.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Shades.

Quote from: Grammy on January 18, 2021, 01:32:43 PM
Could you guys help me move the SimplePortal copyright (screenshot attached) into the SMF 2.0.17 Default wrapper (index.css/div#wrapper) with all the other copyrights instead of by itself below the wrapper?  It's a brand new test forum, all mods installed easily with no manual editing, no forum errors, so I'm not sure if it's meant to be outside the forum wrapper that way, or it that's a glitch? 

Thanks so much.   :)

Can you let me know how you did this cause I have the same issue?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Sir Osis of Liver

We've noticed the "ADD AS ARTICLE" button in display template does not appear in Nightbreeze theme phone view.  It also calls a nonexistent gif.  Same for "REMOVE FROM ARTICLES".



/// Article related buttons...
if (!empty($modSettings['articleactive']))
{
if ($context['can_add_article'] && !$context['topic_is_article'])
$normal_buttons['add_article'] = array('text' => 'sp-add_article', 'image' => 'addarticle.gif', 'lang' => true, 'url' => $scripturl . '?action=portal;sa=addarticle;message=' . $context['topic_first_message'] . ';return=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
if ($context['can_remove_article'] && $context['topic_is_article'])
$normal_buttons['remove_article'] = array('text' => 'sp-remove_article', 'image' => 'removearticle.gif', 'lang' => true, 'url' => $scripturl . '?action=portal;sa=removearticle;message=' . $context['topic_first_message'] . ';return=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
}



Any way to fix this?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: