TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 14, 2024, 08:48:59 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 161
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online

Shortcut Icon to be added in Template Setting

Started by maddog1169, November 08, 2006, 02:39:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maddog1169

Many sites (including this very one use the Shortcuticon feature.

How about integration of that as a setting for the theme ?

bloc

You mean the icon displayed in the browser? the "favicon"?


rebelrose

#3
The problem with adding that is in the link to the favicon you need the url of it, there is no way for the theme designers to know all that information.

The link information for a favicon would be

<link rel="shortcut icon" href="http://www.yourdomain.com/forum/Themes/default/favicon.ico" />

something like that.

However a place with some of the code could be place, but you will still need to code the rest.

bloc

The favicon is also something you rather just upload to the server root..not set trough any script?

maddog1169

uploading for sure as you need the url, but i thought more about having passage in the template where it gets put in with the url given in the possible configuration entry just like it is done with the Logo which is being placed in the header.

thus in the Theme Settings have a

URL of Favicon - Field

and in the template you got something like

Att. No actual code just examplatory
<code>
<?php
          if ( $ThemeConfig['faviconURL'] ) {
                    echo "<link rel="shortcut icon" href=$ThemeConfig['faviconURL'] "
          }
?>
</code>

Reason is the Theme stays maintainable be the SMF/TP  facitities as it is a standart link section
entry if wanted.



bloc

Ah, I forgot..the link in the theme.

If that works it can easily be set through text-field in the theme, in "current theme settings" for example. Different themes could even have different icons then.