[ABD] jQ Preview v.0.0.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

jesschen wrote:I don't know, I have to check if I use another mod(s) that uses jQuery. I don't think I do, but I have to double check.
Firebug shows js-error in postbox
1. element.dispatchEvent is not a function

depends on phpBB3/styles/prosilver/template/prototype.js

2. $(".accordion").accordion is not a function

depends on phpBB3/portal/src/functions-portal.js
you should fix that

-------------------

also there are multiple instances of jquery-*.min.js

so you can try

find in overall_header.html

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/jquery-1.5.1.min.js"></script>
replace with

Code: Select all

<!-- <script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/jquery-1.5.1.min.js"></script> -->

<script type="text/javascript">
// <![CDATA[ 
!window.jQuery && document.write('<script type="text\/javascript" src="http:\/\/code.jquery.com\/jquery-latest.min.js"><\/script>');
// ]]> 
</script>
{T_SUPER_TEMPLATE_PATH} can be {T_TEMPLATE_PATH} or similar

find (i think it's portal relevant in posting_buttons.html)

Code: Select all

<!-- MOD : MSSTI ABBC3 (v3.0.8-pl2) - End //-->
<script src="./portal/src/jquery-1.4.2.min.js" type="text/javascript"></script>
replace with

Code: Select all

<!-- MOD : MSSTI ABBC3 (v3.0.8-pl2) - End //-->
<!-- <script src="./portal/src/jquery-1.4.2.min.js" type="text/javascript"></script> -->
i dont have the original files, so ./portal/ can be {PORTAL_PATH} or similar

find in post crash protection code part

Code: Select all

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
replace with

Code: Select all

<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> -->
Last edited by 4_seven on Wed Aug 31, 2011 7:48 pm, edited 2 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by Jessica »

wait, would those edits fix the problem?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

it should, yes..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by Jessica »

I uninstalled it temporarily, but I'll install it again and put in these edits once I get home from school.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by Jessica »

okay, made first two edits.

where do I make the third edit?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

It's an edit for post crash protection. just take a look of the modx.

Also that additional find (fourth edit) in overall_header.html is relevant (seems to be double inserted)

Code: Select all

<!-- MOD : MSSTI ABBC3 (v3.0.8-pl2) - End //-->
<script src="./portal/src/jquery-1.4.2.min.js" type="text/javascript"></script>
replace with

Code: Select all

<!-- MOD : MSSTI ABBC3 (v3.0.8-pl2) - End //-->
<!-- <script src="./portal/src/jquery-1.4.2.min.js" type="text/javascript"></script> -->
i don't have the original files, so ./portal/ can be {PORTAL_PATH} or similar
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by Jessica »

that fixes it! it now works. thank you
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

fine that it works now,

this was a bit too much jq*min.js in different versions.

therefore i use in unreleased mods this code, to make shure jq*min has no duplicate (thx 2 vse)

Code: Select all

// <![CDATA[
!window.jQuery && document.write('<script type="text\/javascript" src="http:\/\/code.jquery.com\/jquery-latest.min.js"><\/script>');
// ]]>
</script>
also you have always the latest jq_min.

on release it have a local-path bcs. of coding guidelines

ok, the code-slimming on your board also fixed the 2nd error
4_seven wrote:2. $(".accordion").accordion is not a function

depends on phpBB3/portal/src/functions-portal.js
but not the 1st
4_seven wrote:1. element.dispatchEvent is not a function

depends on phpBB3/styles/prosilver/template/prototype.js
it's prototype.js (Line 4619) **

Code: Select all

if (document.createEvent)
element.dispatchEvent(event); **
else
element.fireEvent(event.eventType, event); 
seems a little side-effect from mixing prototype and jquery without using jquery [url=http://api.jquery.com/jQuery.noConflict/]noConflict[/url] methode.
keep in mind, to fix that sometimes. otherwise it seems to take no functional effect.
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] JQ Preview v.0.0.1

Post by Jane Doe »

This

Code: Select all

src="http:\/\/code.jquery.com\/jquery-latest.min.js
make problems because the server is sometime very slow, so you get : waiting for code.jquery.com.

The jquery js should not be loaded from the jquery server.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

This code have nothing to do with slowing down the forum.
Each server have sometimes temporary performance-issues.
But of course you can set this code to a local path.
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] JQ Preview v.0.0.1

Post by Jane Doe »

Yes, i set this to a local path, because loading from jquery server doubles the risk for slowing down the forum.
(as happened a few hours ago where jquery server was veeeery slow.)

Perhaps a working jquery js with an modified jq_preview.html can be added in contrib folder in the mod.
(just an suggestion :) )
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

Thanks for the hint. I will make it soon..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by FaresNB »

Very good mod..

Is it possible that it is auto updated every 5 sec for example ?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] JQ Preview v.0.0.1

Post by 4_seven »

Therefore you can use this (which is a "sister-mod"):
http://www.phpbb.com/customise/db/mod/live_preview/
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [DEV] JQ Preview v.0.0.1

Post by Jessica »

one thing, the buttons appear when creating a PM but they don't work in PMs. only in topics. I click on JQ Preview and there's no preview

how would I get this to work in PMs, if possible?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
Locked

Return to “[3.0.x] Abandoned MODs”