Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Seyit replikacep.com on December 05, 2018, 06:58:00 AM

Title: social sharing mode what is the reason for the mod disapproved
Post by: Seyit replikacep.com on December 05, 2018, 06:58:00 AM
Somebody tells me that this mode is an error of disapproval.

why is not confirmed  where is the error .
i did everything he said   
removed from checklist  says


can someone explain my fault?    :-[

https://custom.simplemachines.org/mods/index.php?mod=4194

smf 2.1
File Edits
./Themes/default/Display.template.php


// Are there any custom profile fields for above the signature?


Add Before: // Add Facebook Like, Tweet, and Google +1 whatsapp +1icon
if (!empty($modSettings['socialization_onoff'])) {
if ($message['id'] == $context['topic_first_message']) {
echo '
<br />
<div id="social"style="margin-left:auto;margin-right:auto;text-align:center;padding-left:12px"><link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">';
   
       
// Show Facebook Like icon in the first post
if (!empty($modSettings['facebook_like'])) {
echo '

<a target="_blank" href="https://www.facebook.com/sharer.php?u=', $scripturl, '?topic=', $context['current_topic'],'" title="Share on Facebook!" class="facebookBtn smGlobalBtn" ></a>';


}

// Show Twitter Tweet icon in the first post
if (!empty($modSettings['twitter_tweet'])) {
echo '
<a target="_blank" href="http://twitter.com/intent/tweet?text=', $scripturl, '?topic=', $context['current_topic'],'" data-counturl="', $scripturl, '?topic=', $context['current_topic'],'" title="Share on Twitter!" class="twitterBtn smGlobalBtn" ></a>';
}

// Show Google +1 icon in the first post
if (!empty($modSettings['googleplus_plusone'])) {
echo '
                               <a target="_blank" href="https://plus.google.com/share?url=', $scripturl, '?topic=', $context['current_topic'],'" title="Share on Google!" class="googleplusBtn smGlobalBtn" ></a>';

   
    }
// pinterest Share thread
if (!empty($modSettings['pinterest_in'])) {
echo '
<a target="_blank" href="http://pinterest.com/pin/create/button/?url=', $scripturl, '?topic=', $context['current_topic'], '"title="Share on Pinterest!" class="pinterestBtn smGlobalBtn" ></a>';

}
// Linked Social Sharein
if (!empty($modSettings['linkedint_in'])) {
echo '
<a target="_blank" href="http://www.linkedin.com/shareArticle?url=', $scripturl, '?topic=', $context['current_topic'], '"title="Share on LinkedIn!" class="linkedinBtn smGlobalBtn" ></a>';

}
// Share on social bton at tumblr
if (!empty($modSettings['tumblr_in'])) {
echo '
<a target="_blank" href="http://www.tumblr.com/share/link?url=', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '" title="Share on Tumblr!"class="tumblrBtn smGlobalBtn" ></a>';

}
   // Rss Butonu  Subject in
if (!empty($modSettings['rss_in'])) {
echo '
<a target="_blank" href="', $scripturl, '?action=.xml;type=rss"title="Rss Butonu" class="rssBtn smGlobalBtn"></a>';

}
  // Show whatsapp +1icon in the first post
if (!empty($modSettings['whatsapp_in'])) {
echo '
                <a target="_blank" href="whatsapp://send?text=', $scripturl, '?topic=', $context['current_topic'], '"title="Share on Whatsapp!" class="whatsappBtn smGlobalBtn"></a>';

}
// Reddit also share social bton
if (!empty($modSettings['reddit_in'])) {
echo '
<a target="_blank" href="http://reddit.com/submit?url=', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '"title="Share on Reddit!" class="redditBtn smGlobalBtn"></a>';

}
// Digg de share social bton
if (!empty($modSettings['digg_in'])) {
echo '
<a target="_blank" href="http://digg.com/submit?url=', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '"title="Share on Digg!" class="diggBtn smGlobalBtn"></a>';

}
    // Telegram de paylas social bton
if (!empty($modSettings['telegram_in'])) {
echo '
<a target="_blank" href="tg:msg_url?url=', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '"title="Telegram da Paylaş" class="telegramBtn smGlobalBtn"></a>';

}

echo '
                    </div>
<br />';
}
}




./Themes/default/index.template.php


Find: 'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')), !empty($context['current_board']) ? ' board_' . $context['current_board'] : '', '">
<div id="footerfix">';



Replace With:  'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')), !empty($context['current_board']) ? ' board_' . $context['current_board'] : '', '">';
// Add Facebook Like, Tweet, and Google +1 whatsapp +1icon
if (!empty($modSettings['socializationsidebar_onoff'])) {
echo '

<div id="social_block" class="col-sm-6 col-xs-12">';

       // sidebar Facebook  icon in
if (!empty($modSettings['facebook_sidebar'])) {
echo '
      <ul><li class="facebook"><a class="_blank" href="https://www.facebook.com/'.$modSettings['facebook_address'].'" 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_address'].'" 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_address'].'" 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_address'].'" 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_address'].'" 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_address'].'" 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_address'].'" target="_blank"><span>Whatsapp</span></a></li>';
     
        }
     // sidebar Telegram  icon in
if (!empty($modSettings['telegram_sidebar'])) {
echo '
       <ul><li class="telegram"></i><a class="_blank" href="tg://resolve?domain='.$modSettings['telegram_address'].'" target="_blank"><span>Telegram</span></a></li>';
       
        }
             }
echo '
                    </div>';


echo '<div id="footerfix">';




Find: template_css();


Replace With: template_css();

echo'<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">';





./Themes/default/css/index.css


Find (at the end of the file): ?>


Add Before: /* social buttons */
#social {margin: 20px 10px;text-align: center;}
.smGlobalBtn { /* global button class */
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border:2px solid #ddd; /* add border to the buttons */
    box-shadow: 0 3px 3px #999;
    padding: 0px;
    text-decoration: none;
    text-align: center;
    color: #fff;
    font-size: 25px;
    font-weight: normal;
    line-height: 2em;
    border-radius: 27px;
    -moz-border-radius:27px;
    -webkit-border-radius:27px;
line-height: 45px;
}
/* facebook button class*/
.facebookBtn{background: #4060A5;}
.facebookBtn:before{ /* use :before to add the relevant icons */font-family: "FontAwesome";content: "\f09a"; /* add facebook icon */}
.facebookBtn:hover{color: #4060A5;background: #fff;border-color: #4060A5; /* change the border color on mouse hover */}
/* twitter button class*/.twitterBtn{background: #00ABE3;}
.twitterBtn:before{font-family: "FontAwesome";content: "\f099"; /* add twitter icon */}
.twitterBtn:hover{color: #00ABE3;background: #fff;border-color: #00ABE3;}
/* google plus button class*/
.googleplusBtn{background: #e64522;}
.googleplusBtn:before{font-family: "FontAwesome";content: "\f0d5"; /* add googleplus icon */}
.googleplusBtn:hover{color: #e64522;background: #fff; border-color: #e64522;}
/* linkedin button class*/
.linkedinBtn{background: #0094BC;}
.linkedinBtn:before{font-family: "FontAwesome";content: "\f0e1"; /* add linkedin icon */}
.linkedinBtn:hover{color: #0094BC;background: #fff; border-color: #0094BC;}
/* pinterest button class*/.pinterestBtn{background: #cb2027;}
.pinterestBtn:before{font-family: "FontAwesome"; content: "\f0d2"; /* add pinterest icon */}
.pinterestBtn:hover{ color: #cb2027; background: #fff;border-color: #cb2027;}
/* tumblr button class*/
.tumblrBtn{background: #3a5876;}
.tumblrBtn:before{font-family: "FontAwesome";content: "\f173"; /* add tumblr icon */}
.tumblrBtn:hover{color: #3a5876;background: #fff;border-color: #3a5876;}
/* rss button class*/
.rssBtn{background: #e88845;}
.rssBtn:before{font-family: "FontAwesome";content: "\f09e"; /* add rss icon */}
.rssBtn:hover{color: #e88845; background: #fff;border-color: #e88845;}
/* whatsapp button class*/
.whatsappBtn{background: #2ab200;}
.whatsappBtn:before{ /* use :before to add the relevant icons */font-family: "FontAwesome";content: "\f232"; /* add whatsapp icon */}
.whatsappBtn:hover{color: #4060A5;background: #fff;border-color: #4060A5; /* change the border color on mouse hover */}
/* reddit button class*/.redditBtn{background: #e64522;}
.redditBtn:before{ /* use :before to add the relevant icons */font-family: "FontAwesome";content: "\f1a1"; /* add reddit icon */}
.redditBtn:hover{color: #4060A5;background: #fff;border-color: #4060A5; /* change the border color on mouse hover */}
/* digg button class*/.diggBtn{background: #3a5876;}
.diggBtn:before{ /* use :before to add the relevant icons */font-family: "FontAwesome";content: "\f1a6"; /* add digg icon */}
.diggBtn:hover{color: #4060A5; background: #fff; border-color: #4060A5; /* change the border color on mouse hover */}
/* Telegram button class*/.telegramBtn{background: #0077b5;}
.telegramBtn:before{ /* use :before to add the relevant icons */font-family: "FontAwesome";content: "\f2c6"; /* add Telegram icon */}
.telegramBtn:hover{color: #4060A5; background: #fff; border-color: #4060A5; /* change the border color on mouse hover */}
#social_block { position: fixed; top: 15%; right: 0; width: 190px; z-index: 1005; -moz-transform: translateX(131px); -webkit-transform: translateX(131px); -o-transform: translateX(131px); -ms-transform: translateX(131px); transform: translateX(131px); }
#social_block ul { padding: 0px; text-align: center; }
#social_block ul li { list-style: none; }
#social_block ul li a { display: inline-block; color: white; height: 50px; width: 185px; border-radius: 3px; line-height: 50px; background: #212121; border: 0; padding: 0; overflow: hidden; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in; }
#social_block ul li a:before { font-size: 20px; width: 50px; float: left; border-right: 1px solid #fff; display: inline-block; font-family: "FontAwesome"; font-weight: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#social_block ul li a:hover { -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in; -moz-transform: translateX(-131px); -webkit-transform: translateX(-131px); -o-transform: translateX(-131px); -ms-transform: translateX(-131px); transform: translateX(-131px); }
#social_block ul .facebook a:before { content: "\f09a"; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in; }
#social_block ul .twitter a:before { content: "\f099"; }
#social_block ul .rss a:before { content: "\f09e"; }
#social_block ul .youtube a:before { content: "\f167"; }
#social_block ul .google-plus a:before { content: "\f0d5"; }
#social_block ul .pinterest a:before { content: "\f0d2"; }
#social_block ul .whatsapp a:before { content: "\f232"; }
#social_block ul .telegram a:before { content: "\f2c6"; }
#social_block ul .facebook a { background: #425F9C; }
#social_block ul .twitter a { background: #00aced; }
#social_block ul .rss a { background: #FF9900; }
#social_block ul .youtube a { background: #E22D26; }
#social_block ul .google-plus a { background: #ed5757; }
#social_block ul .pinterest a { background: #c21a21; }
#social_block ul .whatsapp a { background: #2ab200; }
#social_block ul .telegram a { background: #0077b5; }



./Sources/ManageSettings.php

Find:
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!



Add After:
array('check', 'socialization_onoff'),
array('check', 'facebook_like'),
array('check', 'twitter_tweet'),
array('check', 'googleplus_plusone'),
array('check', 'pinterest_in'),
array('check', 'linkedint_in'),
array('check', 'tumblr_in'),
array('check', 'rss_in'),
array('check', 'whatsapp_in'),
array('check', 'reddit_in'),
array('check', 'digg_in'),
array('check', 'telegram_in'),
array('check', 'socializationsidebar_onoff'),
array('check', 'facebook_sidebar'),
array('text', 'facebook_address', '30'),
array('check', 'twitter_sidebar'),
array('text', 'twitter_address', '30'),
array('check', 'rss_sidebar'),
array('text', 'rss_address', '30'),
array('check', 'googleplus_sidebar'),
array('text', 'googleplus_address', '30'),
array('check', 'pinterest_sidebar'),
array('text', 'pinterest_address', '30'),
array('check', 'youtube_sidebar'),
array('text', 'youtube_address', '30'),
array('check', 'telegram_sidebar'),
array('text', 'telegram_address', '30'),
array('check', 'whatsapp_sidebar'),
array('text', 'whatsapp_address', '30'),



./Themes/default/languages/Modifications.english.php


Find (at the end of the file): ?>


Add Before:
//  social sharing mode
$txt['socialization_onoff'] = '<font style="color:red;">Enable socialization button</font> ';
$txt['socializationsidebar_onoff'] = 'make sidebar active ';
$txt['facebook_like'] = 'Show Facebook Like icon in the first post';
$txt['twitter_tweet'] = 'Show Twitter Tweet icon in the first post';
$txt['googleplus_plusone'] = 'Show Google +1 icon in the first post';
$txt['whatsapp_in'] = 'Show whatsapp +1 icon in the first post';
$txt['rss_in'] = 'rss post';
$txt['pinterest_in'] = 'Show pinterest icon in the first post';
$txt['linkedint_in'] = 'Show linkedint icon in the first post';
$txt['tumblr_in'] = 'Show tumblr icon in the first post';
$txt['reddit_in'] = 'Show Reddit icon in the first post';
$txt['digg_in'] = 'Show Digg icon in the first post';
$txt['telegram_in'] = 'Share Telegram on first post.';
$txt['socializationsidebar_onoff'] = '<font style="color:red;">Activate the Silder sidebar</font> ';
$txt['facebook_sidebar'] = 'activate facebook sidebar ';
$txt['facebook_address'] = ' Enter facebook address in the box next to  ';
$txt['twitter_sidebar'] = 'activate twitter sidebar ';
$txt['twitter_address'] = ' Enter twitter address in the box next to ';
$txt['rss_sidebar'] = 'Enable RSS sidebar ';
$txt['rss_address'] = ' Enter the RSS address in the box next to ';
$txt['googleplus_sidebar'] = 'Activate Googleplus sidebar ';
$txt['googleplus_address'] = ' Enter Googleplus address in the box next to ';
$txt['pinterest_sidebar'] = 'Activate Pinterest sidebar ';
$txt['pinterest_address'] = ' Enter Pinterest address in the box next to ';
$txt['youtube_sidebar'] = 'Activate Youtube sidebar ';
$txt['youtube_address'] = ' Enter Youtube address in the box next to ';
$txt['telegram_sidebar'] = ' Activate Telegram sidebar';
$txt['telegram_address'] = ' Enter the telegram usarname id nosunu ';
$txt['whatsapp_sidebar'] = 'Activate Whatsapp sidebar ';
$txt['whatsapp_address'] = ' Do not forget to enter country code (+9) in the box next to Enter your phone number SAMPLE for example +95544442222 ';
//  social sharing mode Finish



smf 2.0.x   : https://custom.simplemachines.org/mods/index.php?action=parse


Please check the attached package
Title: Re: social sharing mode what is the reason for the mod disapproved
Post by: Illori on December 05, 2018, 07:24:47 AM
you were given the answer in the PM you received. there is no further discussion on this per the response you received.