News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

can someone help me Did you

Started by Seyit replikacep.com, December 01, 2018, 09:19:35 AM

Previous topic - Next topic

Seyit replikacep.com

smf 2.1  index.template.php


QuoteloadCSSFile('font-awesome.min.css');
   template_css();

Quote<link href="',$settings['default_theme_url'],'/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">

what's wrong  give an error

does not accept  error log error

someone help me


Arantor


Seyit replikacep.com

#2
        loadCSSFile('font-awesome.min.css');
template_css();




    // Add Facebook Like, Tweet,  Google +1 whatsapp +1icon
if (!empty($modSettings['socializationsidebar_onoff'])) {
echo '

<div id="social_block" class="col-sm-6 col-xs-12"><link  href="', $settings['default_theme_url'], '/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">';

       // sidebar Facebook  icon in
if (!empty($modSettings['facebook_sidebar'])) {
echo '
      <ul><li class="facebook"><a class="_blank" href="https://www.facebook.com/'.$modSettings['facebook_adres'].'" target="_blank"><span>Facebook</span></a></li>';

        }
// sidebar Twitter icon in
if (!empty($modSettings['twitter_sidebar'])) {
echo '
     <ul><li class="twitter"><a class="_blank" href="http://twitter.com/'.$modSettings['twitter_adres'].'" target="_blank"><span>Twitter</span></a></li>';

}
      // sidebar Rss  icon in
if (!empty($modSettings['rss_sidebar'])) {
echo '
      <ul><li class="rss"><a class="_blank" href="'.$modSettings['rss_adres'].'" target="_blank"><span>RSS</span></a></li>';
     

}   

// sidebar Google   icon in
if (!empty($modSettings['googleplus_sidebar'])) {
echo '
       <ul><li class="google-plus"><a class="_blank" href="https://plus.google.com/'.$modSettings['googleplus_adres'].'" rel="publisher" target="_blank"><span>Google Plus</span></a></li>';
     
}
     // sidebar pinterest  icon in
if (!empty($modSettings['pinterest_sidebar'])) {
echo '
      <ul><li class="pinterest"><a class="_blank" href="http://pinterest.com/'.$modSettings['pinterest_adres'].'" target="_blank"><span>Pinterest</span></a></li>';
       
        }
     // sidebar Youtube  icon in
if (!empty($modSettings['youtube_sidebar'])) {
echo '
      <ul><li class="youtube"><a class="_blank" href="https://www.youtube.com/'.$modSettings['youtube_adres'].'" target="_blank"><span>Youtube</span></a></li>';
       
        }
// sidebar whatsapp aicon in
if (!empty($modSettings['whatsapp_sidebar'])) {
echo '
       <ul><li class="whatsapp"><a class="_blank" href="whatsapp://send?phone='.$modSettings['whatsapp_adres'].'" target="_blank"><span>whatsapp</span></a></li>';
     
        }
             }
echo '
                    </div>';



<link href="/Themes/default/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">';

Trying to add as above


<link  href="', $settings['default_theme_url'], '/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">

the code above does not work


I stayed in the above places I did a mod  help

domain name needs to be automated

Arantor

Well, the loadCSSfile call doesn't know that you've put it in a folder... try adding the folder to the loadCSSfile call (it's designed only for the theme's css folder, it doesn't magically know about subfolders)

Seyit replikacep.com

        loadCSSFile('font-awesome.min.css');
template_css();



<link href="', $settings['default_theme_url'], '/css/font-awesome.min.css" rel="stylesheet">

I tried but it didn't work

Arantor



Arantor

You show me two different things and I have no idea what you've actually tried or in what way it didn't work...

Seyit replikacep.com

domain name must automatically specify  Not specified, but

Illori

then you need to add $settings to your globals.

SychO

Don't add them both, use either the function OR the link tag.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Seyit replikacep.com

Quote from: Illori on December 01, 2018, 11:21:37 AM
then you need to add $settings to your globals.

I don't know how to add :) I added the codes to the topic  i hope you help  :-\

Seyit replikacep.com

Quote from: SychO on December 01, 2018, 11:34:05 AM
Don't add them both, use either the function OR the link tag.

@import url('//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
works with the code above  but I don't want code from outside

Seyit replikacep.com

i found the solution

<link url="' , $_SERVER['SERVER_NAME'] ,'/Themes/default/css/font-awesome.min.css" rel="stylesheet">';


;D ;D ;D ;D ;D ;D

Arantor

Except it won't work if the forum is in a folder.

Seyit replikacep.com


Arantor

But it won't work, and as such it would never pass the code review of the customisation team.

Seyit replikacep.com

Quote from: Arantor on December 01, 2018, 05:19:26 PM
But it won't work, and as such it would never pass the code review of the customisation team.

get it special for me then   :)

already sent for different confirmation :)

Kindred

Except that you are even starting from the wrong concept.

Why would you include fontawesome directly as a fileset?
One of the entire comments behind things like web fonts, jquery, and bootstrap is that they are maintained and updated by the authors ON THE WEB and for everyone to be using the same core.
By forcing a specific set / version of the font css to be installed in a sb sub sub folder, you have bypassed the entire strength of the system.

In short...   you need some further primers on basic coding skills... and submitting mods for us to correct your (many) coding mistakes is not the correct way to do things.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Actually there as perfectly good reasons for not including third party dependencies by trust,  not least of which is that at any time they can just go away.

It's also not unheard of that software (including SMF) gets installed on intranets with no external support in users' browsers. In this particular case, it wouldn't be helpful but in general, the line between bundling all your dependencies vs relying on third parties not to screw up is way more blurred than people realise.

It's why I refuse to touch anything involving npm at work, and grudgingly tolerate Composer.

Advertisement: