Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Theme Site Themes => Topic started by: gecitli on June 01, 2021, 12:18:14 PM

Title: Pelikan Theme
Post by: gecitli on June 01, 2021, 12:18:14 PM
Link to the theme (https://custom.simplemachines.org/index.php?theme=2956)

(https://www.buymeacoffee.com/webtiryaki)

Pelikan Theme

demo:https://smf.webtiryaki.com (https://smf.webtiryaki.com/)

user: Demo
pass: demo

Screenshots



This theme is free for personal and commercial use. You are allowed to use it in your projects, change it and adapt for your purposes. You are not allowed to remove the authors copyright.

License
The MIT License.
Title: Re: Pelikan Theme
Post by: aryansindy on June 01, 2021, 01:19:13 PM
hi,,gecitli thank´s for this nice theme,
I have installt in my site but in the forum Info center dont appeart the Recent Posts!!
how to make it possible??
Link to my site:
Zaxo Forum (http://www.zaxo.at/index.php?action=forum;theme=22)

Title: Re: Pelikan Theme
Post by: gecitli on June 02, 2021, 06:55:18 AM
Quote from: aryansindy on June 01, 2021, 01:19:13 PM
hi,,gecitli thank´s for this nice theme,
I have installt in my site but in the forum Info center dont appeart the Recent Posts!!
how to make it possible??
Link to my site:
Zaxo Forum (http://www.zaxo.at/index.php?action=forum;theme=22)

Hello there
admin-Configuration-Current Theme-Number of recent posts to display on board index: write how many topics will appear here
Title: Re: Pelikan Theme
Post by: aryansindy on June 02, 2021, 07:09:30 AM
Thank you ,is done now its OK,
regard`s
Title: Re: Pelikan Theme
Post by: Portugal on June 12, 2021, 06:29:22 AM
Looks nice. Congratulations.

Its only to 2.1 SMF version?

Thanks
Portugal
Title: Re: Pelikan Theme
Post by: Diego Andrés on October 12, 2021, 10:00:56 PM
Nice theme!
Title: Re: Pelikan Theme
Post by: JessyKa on April 04, 2022, 05:19:42 AM
Hello,
don't know if here is the right place to ask.

Our forum was updated to 2.1.1 and I choose the Pelikan theme as default.

There is a strange phenomenon in log in:

When trying to log in there is an error "token verification failed, please return and try again".
I tried deleting cookies, checked username and password for critical symbols....


The following thread gave me a helpful hint: https://www.simplemachines.org/community/index.php?topic=581284.0

Log in via upper right menu is possible without the token error. Log out through the button in the upper right menu is not possible (An error occured, featur currently not available). Log out is possible via the button within the user-pop-up box (upper right corner).


Is there a problem with the theme using different log-in/-out mechanisms?

Sorry for the bad english!
Title: Global "go up" not working
Post by: Julius_2000 on September 08, 2022, 06:01:44 AM
Hi everyone,

In my adapted Pelikan theme I noticed that the "go up" link in the footer section doesn't do what it's supposed to do. Nothing happens and that was already the way before modding the theme myself.
I compared the pertaining code (I guess) in the index.template.php with the default one and can't seem to see any difference.

Pelikan theme
<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#top_section">', $txt['go_up'], ' &#9650;</a></li>Default theme
<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#top_section">', $txt['go_up'], ' &#9650;</a></li>
I assume that the #topc_section variable has a function/value behind it that might not be correct?

Title: Re: Global "go up" not working
Post by: Doug Heffernan on September 08, 2022, 06:22:18 AM
You will have to ask about this at that theme 's support topic. All questions related to third party mods/themes should be asked at their respective support topics.
Title: Re: Global "go up" not working
Post by: Kindred on September 08, 2022, 08:17:21 AM
#top_section is not a variable.

It refers to an anchor link...   sounds like the theme might be missing that anchor link (either because the theme itself was missing it, or because your edits accidentally removed it)
Title: Re: Global "go up" not working
Post by: Julius_2000 on September 08, 2022, 08:25:46 AM
I'm sorry I posted it in the wrong place, I thought it was a more general question regarding the code itself.

@Kindred, where can I find the anchor link reference in?
Title: Re: Global "go up" not working
Post by: Kindred on September 08, 2022, 08:27:28 AM
probably index.template.php

but, as I said, it looks like it's missing right now (which is why the go up link doesn't work) :)
Title: Re: Global "go up" not working
Post by: Julius_2000 on September 08, 2022, 08:44:24 AM
Maybe I could find that anchor link in the default theme and copy it into my one? Would I only have to look up #top_section or anything else?
Title: Re: Global "go up" not working
Post by: Steve on September 08, 2022, 08:57:28 AM
Quote from: Julius_2000 on September 08, 2022, 08:25:46 AMI'm sorry I posted it in the wrong place, I thought it was a more general question regarding the code itself.
You indicated it was a question regarding a specific theme which is why Doug commented that you should ask in that theme's support topic.

I see nothing so far that changes that so as such, I'm merging this into the Pelikan theme's support topic.
Title: Re: Pelikan Theme
Post by: TwitchisMental on September 08, 2022, 10:45:42 AM
Quote from: Julius_2000 on September 08, 2022, 08:44:24 AMMaybe I could find that anchor link in the default theme and copy it into my one? Would I only have to look up #top_section or anything else?
The best solution would be just changing the ID the go up is linking too.

Find this -

<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#top_section">', $txt['go_up'], ' &#9650;</a></li>
Replace with

<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#header">', $txt['go_up'], ' &#9650;</a></li>
Title: Re: Pelikan Theme
Post by: Julius_2000 on September 08, 2022, 02:02:17 PM
Again, apologies for opening the topic in the wrong place!

And thank you, Twitch! I understand that the #top_section is just an html id that was simply not defined in the theme! So upon your suggestion I inserted one that is et voilà, it works!
Btw, could I use a class name instead of an id there too or would it crash? 

You guys rock!
Title: Re: Pelikan Theme
Post by: TwitchisMental on September 08, 2022, 04:24:18 PM
Quote from: Julius_2000 on September 08, 2022, 02:02:17 PMAgain, apologies for opening the topic in the wrong place!

And thank you, Twitch! I understand that the #top_section is just an html id that was simply not defined in the theme! So upon your suggestion I inserted one that is et voilà, it works!
Btw, could I use a class name instead of an id there too or would it crash? 

You guys rock!
Doesn't matter if class or id. Header is just usually in the top, so it works :).
Title: Re: Pelikan Theme
Post by: Antechinus on September 09, 2022, 04:09:50 AM
Quote from: Julius_2000 on September 08, 2022, 02:02:17 PMBtw, could I use a class name instead of an id there too or would it crash?
Use an ID. TBH I am not sure it is possible for an anchor to target a class (have never tried it) but even if it were possible it would confuse things if you have two or more instances of that class on the page. An ID is unique, so only ever the one target, so will always work. :)

ETA: Just checked the specs (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#sect6). Class name no can do. But, there are some interesting points about ID's.
QuoteNote: You can use href="#top" or the empty fragment (href="#") to link to the top of the current page, as defined in the HTML specification

So this would work (which I knew but had forgotten) and does not require any actual target element:
<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#">', $txt['go_up'], ' &#9650;</a></li>
This would also work, regardless of whether the element #top existed or not:
<a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#top">', $txt['go_up'], ' &#9650;</a></li>
Really, for simplicity and idiot-proofing, we should always be using this:
<a href="#">
Title: Re: Pelikan Theme
Post by: Julius_2000 on September 09, 2022, 07:56:19 AM
Quote from: TwitchisMental on September 08, 2022, 04:24:18 PMDoesn't matter if class or id. Header is just usually in the top, so it works
Yeah, usually, but in this instance there wasn't an ID named header so it didn't work. I then used one of my own IDs and it worked so I figured (being a noob and all) that this had to be an Html reference in the href.


Quote from: Antechinus on September 09, 2022, 04:09:50 AMUse an ID. TBH I am not sure it is possible for an anchor to target a class (have never tried it) but even if it were possible it would confuse things if you have two or more instances of that class on the page. An ID is unique, so only ever the one target, so will always work.
Really, for simplicity and idiot-proofing, we should always be using this:

Yes, I realized it the minute I posted that, classes wouldn't probably make sense. Is the logic behind the href="something" that it would grab the first thing of that element it finds? Like what you said with your fool-proof hashtag-only approach? So, does it jump right to the first # it sees in the Html code?
Title: Re: Pelikan Theme
Post by: TwitchisMental on September 09, 2022, 11:07:38 AM
Quote from: Antechinus on September 09, 2022, 04:09:50 AM
Quote from: Julius_2000 on September 08, 2022, 02:02:17 PMBtw, could I use a class name instead of an id there too or would it crash?
Use an ID. TBH I am not sure it is possible for an anchor to target a class (have never tried it) but even if it were possible it would confuse things if you have two or more instances of that class on the page. An ID is unique, so only ever the one target, so will always work. :)

ETA: Just checked the specs (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#sect6). Class name no can do. But, there are some interesting points about ID's.
Well then... I stand corrected lol.  Thank you :).
Title: Re: Pelikan Theme
Post by: Antechinus on September 09, 2022, 07:22:28 PM
Quote from: Julius_2000 on September 09, 2022, 07:56:19 AMIs the logic behind the href="something" that it would grab the first thing of that element it finds?
As far as I know, yes, but the HTML specs are a bit brain-frying to read.

QuoteLike what you said with your fool-proof hashtag-only approach? So, does it jump right to the first # it sees in the Html code?
No. The hashtag-only thing is part of the HTML specs. It will jump to the top of the page even if there are no id's at all on the page.* It's built in to HTML that # always goes to the top of the page. Ditto for #top, even if there is nothing actually named id="top" in the markup. :)

This is why in javascript you will often see something like this on a clickable element:
<a href="#" onclick="javascript:myFunc()">onclick</a>
The anchor needs a href to automatically be clickable but if you want people to be able to click it without the page jumping you have to include something like preventDefault() in your click function (to stop the default behaviour, which is jump to top).
Title: Re: Pelikan Theme
Post by: Julius_2000 on September 15, 2022, 05:08:57 AM
Thanks for the clarification! I'm learning a lot thanks to you guys.
Title: Re: Pelikan Theme
Post by: Julius_2000 on October 30, 2022, 07:23:13 AM
Hi all, just wanted to report a bug/ fix for Pelikan theme:

I reported a general bug to SMF forum about the missing/ wrong icon for the login popup header for the visitor/ guest (javascript) login. SMF corrected the code in the Subs.php file that was missing the 'loign' addendum to the javascript which resulted in a wrong class (main_icons help instead of main_icons login).

https://www.simplemachines.org/community/index.php?topic=584032.0
https://github.com/SimpleMachines/SMF/pull/7585/files#diff-6abd038855dcfe48a9c579b068758effd5314f6a0f4f4438a310305a9c14ae00L5545-R5545

Because Pelikan Theme uses a different HTML element called "Visitor" for guests, the general fix won't affect the theme and thus needs to be adapted as well in the Index.Template.php file
Quote// Otherwise they're a guest. Ask them to either register or login.
    else
    {
        echo '
            <ul class="user-menu menu menu--flat" id="top_info">
                <li class="visitor">
                    <a class="login" href="', $scripturl, '?action=login" onclick="return ', empty($maintenance) ? 'reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ', \'login\')' : 'true', ';"><i class="fas fa-right-to-bracket"></i> <span class="header__user-panel-text">', $txt['login'], '</span></a>
                </li>';

Also, the definition for .main_icons.login::before is not set in Pelikan making the header missing the icon and background color entirely.
Title: Re: Pelikan Theme
Post by: Volker S on December 03, 2022, 08:32:36 AM
How do you fold in a category in this theme (Forum version 2.1.3)?
The "BoardIndex.template.php" provid this, as with many other themes.

For example (https://www.jollauser.de): Jolla Tablet is hidden - but does not work in this theme.
Title: Re: Pelikan Theme
Post by: Julius_2000 on December 03, 2022, 12:53:19 PM
Do you mean the boards should be able to collapse (toggle up/ down)?

If so, I believe the author of this theme removed the collapse function.
Title: Re: Pelikan Theme
Post by: Volker S on December 03, 2022, 02:26:05 PM
That would be one explanation, although there are still pieces of code from the shrink in Boardindex.template.php:
<div class="main_container p-2 space-y-2 bg-white rounded-lg shadow">
<div class="items-center px-4 py-2 space-x-4 text-white rounded-lg shadow bg-gradient-to-r from-purple-700 to-purple-600 ', $category['is_collapsed'] ? 'collapsed' : '', '" id="category_', $category['id'], '">
               
<h3 class="catbg">';

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])

echo '
<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';

echo '
', $category['link'], '
</h3>', !empty($category['description']) ? '

<div class="desc">' . $category['description'] . '</div>' : '', '
</div>
<div id="category_', $category['id'], '_boards" class="divide-y divide-gray-200" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>';
and 'grayed out' is the category heading still there. See that Link (https://www.forum.jeepzone.de) from my Testforum (Access: testuser / test).
Title: Re: Pelikan Theme
Post by: Julius_2000 on December 03, 2022, 04:17:02 PM
Yep, I'm aware, I use the same theme. I believe the author made a half-baked removal of the code.

The reason the category for the Allgemeine Diskussionen board (which is actually a seperate forum) is grayed out is because of these CSS lines:

.collapsed {
      opacity: .5;
      transition: 1s;
}

.collapsed:hover {
      opacity: 1;
}

The residual code was meant for actual collapsible boards. Which would make sense because only a collapsed board should have an opacity below 1 and 1 when hovered over.
What you could do is: Either edit the above CSS code or make the board non-collapsible in Admin/Forum/Boards & Categories/ Modiy Boards. I had the same issue and this helped.
Title: Re: Pelikan Theme
Post by: Julius_2000 on August 21, 2023, 11:31:24 AM
Hi

I just realized that this theme somehow does not provide the search box where you can also select "in topic" searches. The search button in the menu strip only redirects to the general search page where no such option exists.

Has this function/ box only been disabled or permanently removed?
Title: Re: Pelikan Theme
Post by: Steve on August 21, 2023, 04:04:06 PM
That's likely intentional as another theme I use worked the same way, i.e., no search box.

Hextech was designed the same way. See the topic starting here: https://www.simplemachines.org/community/index.php?topic=583511.msg4134585;topicseen#msg4134585
Title: Re: Pelikan Theme
Post by: Julius_2000 on August 21, 2023, 05:33:37 PM
Ah, thanks! That sucks since it's a useful tool if you want to just search a large topic.

Now I'm working on getting it back, which I'm partially successful of. The only struggle I have is that the search box is a form and I had to learn that nested forms are not allowed. So now I have to find a way to get it to place the box where I want it to be.
Title: Re: Pelikan Theme
Post by: Julius_2000 on August 22, 2023, 07:18:34 AM
Thank you, @Steve, for putting so much effort into helping me, that's really appreciated! Since the theme only served as the foundation (I have heavily customized it) it wouldn't fit with current look.
I pushed and shoved some of the elements (moderationbuttons, pagesection) out of the post container "form" in MessageIndex.template.php as well as Display.template.php and placed the search box above the pagesection at the bottom of the topic index/ topics like this:

You cannot view this attachment.
You cannot view this attachment.

So far, it seems working. I had to adjust quite a couple of index/responsive.css selectors as well, though.

Title: Re: Pelikan Theme
Post by: Steve on August 22, 2023, 07:20:44 AM
Sorry, I had just deleted my post because it wasn't putting the search box where I wanted.