News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimplePortal

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

Previous topic - Next topic

Sir Osis of Liver

Can't get to the front page at all now, but don't think all the active blocks are being displayed.  Should be abe to get to admin, will disable all blocks and reactivate one at a time.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

#5421
Here's the bad block.

This is the link - http://www.superchevy.com/rss/articles/features
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Chen Zhen


You can limit the rss feed to 10 items for now until I have time to look at Sinan's subroutine.
It shouldn't be allowing any feed to jam it up like that.

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

Sir Osis of Liver

It's a bad link, the feed appears to be down, browser sees a file download.  Forum owner is looking for another feed to replace it, meanwhile the block's deactivated and all urls to the forum work.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Ilkharnos

Hello,

I need a small modification for the "Recent Posts" blocks I use in my portal page. When a topic is new (unread), instead of creating a "new.gif" icon, I need to give a certain color to the link itself. But I don't know how to do that. I would be grateful if you can help me.

if ($display == 'compact')
{
foreach ($items as $key => $item)
echo '
<a href="', $item['href'], '">', $item['subject'], '</a> <span class="smalltext">', ' ', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</span><br />', empty($item['is_last']) ? '<hr />' : '';
}


Thank you in advance.

Antechinus

Easiest way is to give the new ones a class. That way you can style them in your CSS without changing markup every time you want a different look. This should do the trick:

if ($display == 'compact')
{
foreach ($items as $key => $item)
echo '
<a href="', $item['href'], '" ', $item['new'] ? '' :'class="some_useful_class_name_that_wont_confuse_people"','>', $item['subject'], '</a>
<br />',
empty($item['is_last']) ? '<hr />' : '';
}

Ilkharnos

Yes, this worked for me well.

When I tried to add color to this new class through portal.css, I realised that the color style for standard forum links (in index.css) overrides the new color I am trying to add. So I wasn't able to change the font color. However, I was able to use other font styles (such as shadow) which didn't create any conflict. So, I solved the problem by adding a blue shadow for unread links. This seems enough for what I am trying to do.

You have been the most helpful. Thank you.

Antechinus

Should be able to change the colour, or anything else, if you use the right CSS. What code were you trying to use? 

Ilkharnos

I entered "unreadcolor" as a classname in your code. Then I added the following into portal.css

.unreadcolor
{
color: #hexcode;
}


I tried different hex codes for the color.

Other styles such as font-weight or text-shadow are working well. But color tag didn't work. The color remains the same as specified in index.css for all forum links.

Antechinus

Aha. Yep, CSS specificity. The default index.css uses this:

/* Normal, standard links. */
a:link, a:visited
{
color: #346;
text-decoration: none;
}


If you declare your class as links it should work.

a.unreadcolor:link, a.unreadcolor:visited {
color: #hexcode_of_your_choice;
}
a.unreadcolor:hover {
color:#different_on_hover_if_you_want_that
}


Give that a whirl and see what happens. :)

Ilkharnos

Yes. Now it works perfectly  :D

I am really grateful. Thank you very much!

AKlion

After installing my portal on the main page, I need to make the forum remain on the main page, how can I do this?

When I posted the portal, two links appeared on the menu / FORUM / FORUM /. How can I make it / PORTAL / FORUM /?

OCJ

Sad to see that simpleportal.net is now only archive status so no login, no posts, no replies. This is now the only place left to comment.
It was, and still is, a great portal for SMF. Maybe it is supported on another fork of SMF.
:(

Arantor

Someone forked it for 2.1 under the name EhPortal.

Bigguy


Dwev

I'm trying to show an image in an SimplePortal block, it seems that the Custom HTML option would be the right one to use for this.

But whatever I enter in that block, I just get to see the code, no image.
I've searched on the whole SMF forum and in this thread specifically, but so far haven't found an answer.

Can anybody point me to the answer how I can show an image in a SimplePortal Block?

Maybe with some example code?

SMF and SimplePortal are both up-to-date (SMF is version 2.0.15, SimplePortal is version 2.3.7).

Thanks in advance.

Arantor

What code were you trying to use?

Dwev

Tried different approaches, even the most basic one:

<!DOCTYPE html>
<html>
<body>

<img src="https://www.w3schools.com/tags/smiley.gif" alt="Smiley face" width="42" height="42">

</body>
</html>


Tried the same without the "DOCTYPE html", with html forum-tags, etc.
No dice in any way...[/code]

lurkalot

Just this, should be enough to display a image in a custom html block.

<img src="https://www.w3schools.com/tags/smiley.gif" alt="Smiley face" width="42" height="42">

Chen Zhen


A HTML block only needs what you intend to put in the body of the document.

Imo use inline styling or perhaps a cascading style sheet (via class) instead of using the width/height properties directly.
em's are more device friendly if you're looking for a responsive layout.


<img src="https://www.w3schools.com/tags/smiley.gif" alt="Smiley face" style="height: 2.625em;width: 2.625em;">

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

Advertisement: