Webmaster Forum


Go Back   Webmaster Forum > Marketing Forums > Webmaster Revenue
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Webmaster Revenue Discuss money making strategies and ideas. Includes AdSense, YPN and affiliate programs.

Bidding Directory   World's Leading Outsourcing Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-04-2008, 05:14 AM   #1 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
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.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 01-04-2008, 06:20 AM   #2 (permalink)
Contributing Member
 
Join Date: 07-06-07
Location: Phoenix, Arizona
Posts: 503
iTrader: 0 / 0%
sleepyhead is liked by somebodysleepyhead is liked by somebodysleepyhead is liked by somebodysleepyhead is liked by somebody
welcome to V7N.
sleepyhead is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-04-2008, 06:28 AM   #3 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
Can you help me out?
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 12:45 PM   #4 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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
__________________
Visiting Angels Houston


I spell bad because I can...

Last edited by jdspc : 01-05-2008 at 12:49 PM. Reason: More advice on editing the theme...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 01:18 PM   #5 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
Pls i don't understand, how do i upload the kontera code into the default theme, can i copy and paste? thanks.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 01:39 PM   #6 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 01:48 PM   #7 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
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?
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 01:56 PM   #8 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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..
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 03:45 PM   #9 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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");
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:14 PM   #10 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
I give up because it's crashing my forum. I believe the code should be added to the display template.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:17 PM   #11 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
What kind of error msg are you getting?
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:23 PM   #12 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
Man that's great, i could see that it work on your forum.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:24 PM   #13 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
I was trying to add kontera code directly to my index template.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:35 PM   #14 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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.
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 04:46 PM   #15 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
I have upload the kontera file into the index template still nothing shows.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 05:35 PM   #16 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
uploaded to the forum root folder?
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 05:41 PM   #17 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
What is the name of the root folder?
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 05:43 PM   #18 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
Because i do upload it already to the defaut theme folder.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 06:08 PM   #19 (permalink)
Contributing Member
 
Join Date: 01-04-08
Location: France
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bob8 is liked by many
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.
Bob8 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2008, 10:17 PM   #20 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 1,065
iTrader: 0 / 0%
Latest Blog:
Liar?s Lullabye

jdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to beholdjdspc is a splendid one to behold
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.
__________________
Visiting Angels Houston


I spell bad because I can...
jdspc is offline  
Add Post to del.icio.us
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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