evertsemeijn

Topic: Keep running into problems with functions.js

It's not the first time I'm developing a Jobberbase template (lol) and every time I keep running into problems with functions.js. I think it could need a rewrite. Let's start by removing the Fixpng function. IE6 died a long time ago and designers aren't supporting it any longer (www.wijstoppenook.nl).

For iPhonica I want to remove send-to-friend, 'cause I'm replacing it with Addthis.com, but when doing that the #report-spam-response doesn't show up anymore.

Anyone willing to help me?

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

Mario

Re: Keep running into problems with functions.js

I doubt about "IE6 died", I remember I saw stats and it was like 10% of internet users (maybe cuz it's the browser by default in XP and many ppl are still installing XP)

putypuruty

Re: Keep running into problems with functions.js

@evert
I'll have a look into this in the evening. I also agree that we could remove the FixPng method because in the end it doesn't break anything in IE6, just the .png images wouldn't be transparent, big deal wink

evertsemeijn

Re: Keep running into problems with functions.js

@putypuruty
If i'm correct the RSS img is a gif so no need to fix it (that's he only thing the function is doing) wink

@Mario
Trust me! A browser that's more than 10+ years old, is insecure and doesn't understand web standards is dead.

Microsoft wrote:

“recommend users of IE6 on Windows XP upgrade to a new version of Internet Explorer”

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

SteveSPI

Re: Keep running into problems with functions.js

A quick question about addthis.com..

I tried adding this next to search job results (i.e. on post-loop) rather than just at the bottom of the job details, but it which displayed fine. But when you clicked it, it would only every point to the currect URL. i.e. http://www.speedyjob.co.uk/search/ rather than the Job it should be paired. Do you know how to change what URL is sent to addthis.com??

If not, not to worry. Just an idea.

Cheers,

Steve

SpeedyJob.co.uk

SteveSPI

Re: Keep running into problems with functions.js

Actually ignore this post, i just went onto the Addthis.com forum and found the answer. Silly old me!! I really must research these things before I post on here. Im going to give it a go later :-)

SpeedyJob.co.uk

Chronos

Re: Keep running into problems with functions.js

Even though IE6 is, in your terms, 'dead', it is still used by a large amount of people. I agree we shouldn't waste much time on it, but the website should at the very least still be usable (perhaps with the addition of an upgrade-now bar on top). The fix-png is a visual thing though, so that can just as well be removed.

Member of Jobberbase Development Team - Implementation and Coding

Visit my Blog: ChronoScripts (JobberBase scripts, support and freelance)
JobBoards: Telefonisch Werk and Top Bijbaan

evertsemeijn

Re: Keep running into problems with functions.js

The best thing to do, when designing websites, is to always validate your code. That way your code is future proof and degrades best in older browsers. Giving full support for IE6 ussually takes twice the time it takes to write valid code.

I'll write a tutorial on an "update your IE6 bar" soon. But let's not take this thread a different way. It's about functions.js smile

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

putypuruty

Re: Keep running into problems with functions.js

@evert

I managed to remove everything related to recommend to a friend and the report spam still works nicely:

This is what I did:

- in functions.js, I've removed lines 64-88

Code:
SendToFriend: {
    showHide: function()
    {
        $("#send-to-friend").toggle();
    },

    sendMsg: function()
    {
        $("#frm-send-to-friend").ajaxForm(function(responseText) { 
            if (responseText == "0")
            {
                var msg = Jobber.I18n.js.send_to_friend_unsuccessful;
                $("#send-to-friend-response").css({ color: "red" });
            }
            else
            {
                var msg = Jobber.I18n.js.send_to_friend_successful;
                $("#frm-send-to-friend").clearForm();
                $("#send-to-friend-response").css({ color: "green" });
            }
            $("#send-to-friend-response").html(msg);
        });
    }
},

- in job.tpl, I've removed line 12

Code:
<a href="#" onclick="Jobber.SendToFriend.showHide(); return false;" title="{$translations.recommend.title}">{$translations.recommend.title}</a>

- also in job.tpl, I've removed lines 41-48

Code:
{literal}
    <script type="text/javascript">
        $(document).ready(function()
        {
            Jobber.SendToFriend.sendMsg();
        });
    </script>
{/literal}

I refreshed a job page and reported the job as spam and it worked nicely.

PS: I gave a more detailed response because I don't know if the line numbers match wink

evertsemeijn

Re: Keep running into problems with functions.js

Thanks! I'll check it asap with mine. Will keep you posted.

Cheers!

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes