Webmaster Forum

Go Back   Webmaster Forum > Marketing Forums > Webmaster Revenue

Webmaster Revenue Discuss money making strategies, ideas to monetize your website or blog, tips and techniques to increase webmaster revenue, etc. This forum is NOT for promoting your own site or referral link.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 01-04-2008, 05:14 AM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Question I need Help for Kontera

Please how do i add kontera in text link to my forum posts? I'm using SMF defaut theme. Thanks.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 01-04-2008, 06:20 AM
sleepyhead's Avatar
sleepyhead sleepyhead is offline
Contributing Member
 
Join Date: 07-06-07
Location: Phoenix, Arizona
Posts: 478
iTrader: 0 / 0%
welcome to V7N.
 
Reply With Quote
  #3  
Old 01-04-2008, 06:28 AM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Can you help me out?
 
Reply With Quote
  #4  
Old 01-05-2008, 12:45 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Quote:
Originally Posted by Bob8 View Post
Please how do i add kontera in text link to my forum posts? I'm using SMF defaut theme. Thanks.

Since you are dealing with js, it is more effective to use an 'include' with SMF since everything is inside a PHP block.

You need to edit the index.template.php file that goes with the theme you use.
Find the place where </body> is produced from and add the code above that point.

include("mykontera.inc");

Prepare a text file called mykontera.inc and paste in the code from Kontera. Save and upload to the site, same theme folder.

This works well for statcounter js as well.

Editing the default theme is not advisable. Make a copy for b/u or create a new theme based on the default.
Remeber to b/u your tables before you edit any templates. Everytime!

Let me know and holler if you need more info...

J

Last edited by jdspc; 01-05-2008 at 12:49 PM. Reason: More advice on editing the theme...
 
Reply With Quote
  #5  
Old 01-05-2008, 01:18 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Pls i don't understand, how do i upload the kontera code into the default theme, can i copy and paste? thanks.
 
Reply With Quote
  #6  
Old 01-05-2008, 01:39 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Paste your code into a .txt file and name it mykontera.inc
Upload this txt file to the themes root folder. I like to use SmartFTP.
Then, in the index.template.php file insert this line just above the </body> tag (somewhere around line 500 depending)

include("mykontera.inc")

In the layout and themes section in the admin is where you modify your templates.

If you have never done this I highly recommend that you read some docs at the smf forum. They have a very nice tutorial, if you will, concerning editing templates. Much better than I can explain.

But again, make a copy of the theme.

I am more than happy to assist you if you need more help though.

J
 
Reply With Quote
  #7  
Old 01-05-2008, 01:48 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
I'm using frontpage to publish my site, so i always do the modifications and editing through my frontpage remote panel, I already open the index.template.php file in my frontpage remote panel what next should i do?
 
Reply With Quote
  #8  
Old 01-05-2008, 01:56 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Find the </body> tag and above it, insert the line
include("mykontera.inc")

Then upload the txt file you created, "mykontera.inc", along with it.

Should fly..
 
Reply With Quote
  #9  
Old 01-05-2008, 03:45 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Quote:
Originally Posted by jdspc View Post
Find the </body> tag and above it, insert the line
include("mykontera.inc")

Then upload the txt file you created, "mykontera.inc", along with it.

Should fly..
Let me add - the line should read
include("mykontera.inc");
 
Reply With Quote
  #10  
Old 01-05-2008, 04:14 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
I give up because it's crashing my forum. I believe the code should be added to the display template.
 
Reply With Quote
  #11  
Old 01-05-2008, 04:17 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
What kind of error msg are you getting?
 
Reply With Quote
  #12  
Old 01-05-2008, 04:23 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Man that's great, i could see that it work on your forum.
 
Reply With Quote
  #13  
Old 01-05-2008, 04:24 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
I was trying to add kontera code directly to my index template.
 
Reply With Quote
  #14  
Old 01-05-2008, 04:35 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Quote:
Originally Posted by Bob8 View Post
I was trying to add kontera code directly to my index template.
If you go that route, you have to take pains to escape the js parenthesis and that will cause trouble. Thus the include method.
 
Reply With Quote
  #15  
Old 01-05-2008, 04:46 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
I have upload the kontera file into the index template still nothing shows.
 
Reply With Quote
  #16  
Old 01-05-2008, 05:35 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
uploaded to the forum root folder?
 
Reply With Quote
  #17  
Old 01-05-2008, 05:41 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
What is the name of the root folder?
 
Reply With Quote
  #18  
Old 01-05-2008, 05:43 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Because i do upload it already to the defaut theme folder.
 
Reply With Quote
  #19  
Old 01-05-2008, 06:08 PM
Bob8 Bob8 is offline
Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Can you pls copy and paste your forum index template code </body> tag code with the "mykontera.inc" and post it here so that i see how it look. Maybe that will help me, thanks.
 
Reply With Quote
  #20  
Old 01-05-2008, 10:17 PM
jdspc's Avatar
jdspc jdspc is offline
Jeffesis
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,678
iTrader: 0 / 0%
Each index.template.php will vary according to the mods installed but..
on mine starting at line 471 is the following;
Look for a comment with
Code:
// Unfortunately, Safari does not have...
scroll down and insert the line
Code:
include("mykontera.inc");
after the last </div> before the comment on AJAX (see below)


PHP Code:
        // Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
        
if ($context['browser']['is_safari'])
            echo 
'
            window.addEventListener("load", smf_codeFix, false);

            function smf_codeFix()
            {
                var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

                for (var i = 0; i < codeFix.length; i++)
                {
                    if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
                        codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
                }
            }'
;
        elseif (
$context['browser']['is_firefox'])
            echo 
'
            window.addEventListener("load", smf_codeFix, false);
            function smf_codeFix()
            {
                var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

                for (var i = 0; i < codeFix.length; i++)
                {
                    if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
                        codeFix[i].style.overflow = "scroll";
                }
            }'
;            
        else
            echo 
'
            var window_oldOnload = window.onload;
            window.onload = smf_codeFix;

            function smf_codeFix()
            {
                var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

                for (var i = codeFix.length - 1; i > 0; i--)
                {
                    if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
                        codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
                }

                if (window_oldOnload)
                {
                    window_oldOnload();
                    window_oldOnload = null;
                }
            }'
;

        echo 
'
        // ]]></script>'
;
    }

    echo 
'
    </div>'
;
include(
"mykontera.inc");
    
// The following will be used to let the user know that some AJAX process is running
    
echo '
    <div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;

Then upload the file you made earlier containing the kontera js that you named mykontera.inc to the folder of your theme...ie themes/default

This is the easiest method.

Let me know and holler with any questions.
 
Reply With Quote
Go Back   Webmaster Forum > Marketing Forums > Webmaster Revenue

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anybody use Kontera here? Nikhil Webmaster Revenue 12 01-03-2008 08:25 AM
Kontera - Another best way of Revenue netjobs Webmaster Revenue 31 06-30-2007 07:47 AM
Kontera & Adsense? Julie Webmaster Revenue 8 05-08-2007 05:56 AM
Will Google Create Something Like Kontera? Vahid Google Forum 4 05-07-2007 03:24 PM
Kontera??? _123_ Webmaster Revenue 4 05-07-2007 03:08 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:04 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC