The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#52
|
|||
|
|||
I'm not been able to reproduce the link stuff you mentioned, but This version could solve this stuff and the related with the &
Please, try it and let me know... Code:
<script type="text/javascript"> function checkURL() { if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;} if (url.indexOf('"')>=0) {return false;} if (url.indexOf("http://maps.google")!=0){return false;} return true } tot=''; tot_ini='{param}'; tot_no_amp=tot_ini.replace(/&/g,'&'); tot_no_quo=tot_no_amp.replace(/"/g,'"'); tot=tot_no_quo.substr(tot_no_quo.indexOf('marginwidth="0" src="')+21,tot_no_quo.length); url=tot.substr(0,tot.indexOf('"')); urlp=url.replace(/amp;/g,''); url=urlp; if (checkURL()) { document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>'); } else { document.write("<p><b>WRONG URL</b></p>Recorda que cal enganxar el contingut del camp que indica que es per enganxar en una web.<br />Un cop arreglat el post, has de recarregar la plana per poder veure si ha funcionat."); } </script> Thanks |
#53
|
||||
|
||||
Hi oasi,
Nothing changed so far, let's see. This is the link I'm using for tests already with gmap tags [gmap]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=pt-BR&q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&ie=UTF8&cd=1&geocode=FdJhm P4de304_Q&ll=-23.558323,-46.62529&spn=0.036583,0.054932&z=14&iw loc=addr&output=embed&s=AARTsJrSb_gFa1Ssu_ 1wwOFTDbl5gJKezg"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=pt-BR&q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&ie=UTF8&cd=1&geocode=FdJhm P4de304_Q&ll=-23.558323,-46.62529&spn=0.036583,0.054932&z=14&iw loc=addr&source=embed" style="color:#0000FF;text-align:left">Exibir mapa ampliado</a></small>[/gmap] And this is the source code of my page after I post it. Code:
<!-- message --> <div id="post_message_26"><font face="Arial"><font size="2"><script type="text/javascript"> function checkURL() { if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;} if (url.indexOf('"')>=0) {return false;} if (url.indexOf("http://maps.google")!=0){return false;} return true } tot=''; tot_ini='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="[url="http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;geocode=FdJhmP4de304_Q&amp;ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJrSb_gFa1Ssu_1wwOFTDbl5gJKezg"></iframe><br"][color=#0000ff]http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;geocode=FdJhmP4de304_Q&amp;ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJrSb_gFa1Ssu_1wwOFTDbl5gJKezg"></iframe><br[/color][/url] /><small><a href="[url="http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;geocode=FdJhmP4de304_Q&amp;ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=14&amp;iwloc=addr&amp;source=embed"][color=#0000ff]http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;geocode=FdJhmP4de304_Q&amp;ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=14&amp;iwloc=addr&amp;source=embed[/color][/url]" style="color:#0000FF;text-align:left">Exibir mapa ampliado</a></small>'; tot_no_amp=tot_ini.replace(/&/g,'&'); tot_no_quo=tot_no_amp.replace(/"/g,'"'); tot=tot_no_quo.substr(tot_no_quo.indexOf('marginwidth="0" src="')+21,tot_no_quo.length); url=tot.substr(0,tot.indexOf('"')); urlp=url.replace(/amp;/g,''); url=urlp; if (checkURL()) { document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>'); } else { document.write("<p><b>WRONG URL</b></p>Recorda que cal enganxar el contingut del camp que indica que es per enganxar en una web.<br />Un cop arreglat el post, has de recarregar la plana per poder veure si ha funcionat."); } </script></font></font></div> <!-- / message --> |
#54
|
|||
|
|||
Subscribing to thread, this is a wonderful hack, hope the "Wrong map URL, edit the post to change it." errors get fixed as that's a problem for me as well.
|
#55
|
|||
|
|||
First of all a big thank you to Oasi for studing on this very useful mod. I'm search for it for a long time!
I've tried to embed several Google maps without any problem but now I want to embed this kind of map , but I've had negative result. This is the web page from where I have take the iframe link: Code:
http://maps.google.com/maps?f=d&saddr=Bagolino+BS&daddr=darfo+boario+to:endine+to:Frazione+Rigosa%2FSP28+to:san+pellegrino+terme+to:sant%27omobono+imagna+to:valcava+to:Como+CO&hl=it&geocode=%3B%3B%3BFR7ougId7q6UAA%3B%3B%3B%3B&mra=ls&via=3&sll=45.702343,9.813538&sspn=0.895773,1.757813&ie=UTF8&ll=45.844108,9.775085&spn=0.893499,1.757813&t=p&z=9 Could you solve also this issue, please? Thank you Regards Tintin |
#56
|
|||
|
|||
Ok, now I see the error
Please, test this code (this is going to fix the tintin74 problem too) and tell if it works to upgrade the "release" The damn code BBCode don't seems to work... <script type="text/javascript"> function checkURL() { if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;} if (url.indexOf('"')>=0) {return false;} if (url.indexOf("http://maps.google")!=0){return false;} return true } tot=''; tot_ini="{param}"; tot_no_quo=tot_ini.replace(/"/g,'"'); if(tot_no_quo.indexOf("[url=")>0) { tot=tot_no_quo.substr(tot_no_quo.indexOf('[url="')+6,tot_no_quo.length);} else { tot=tot_no_quo.substr(tot_no_quo.indexOf('src="')+ 5,tot_no_quo.length);} url=tot.substr(0,tot.indexOf('"')); urlp=url.replace(/amp;/g,''); url=urlp; if (checkURL()) { document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>'); } else { document.write("<p><b>Wrong map URL, edit the post to change it.</b></p>Reload the page when finished to check if correct."); } </script> |
#57
|
|||
|
|||
Yeeeeessss! Thank you very much , Oasi!
|
#58
|
|||
|
|||
I get the "Wrong map URL, edit the post to change it." message with the 1.0 script, and nothing gets rendered with this one.
|
#59
|
|||
|
|||
Please, could you paste the generated code for your page, as LeoBrazil did, or paste an example URL?
If I can see the value for the tot_ini variable I would be able to figure what's wrong... |
#60
|
||||
|
||||
With the new code I've got double error messages.
Here is what I've got from the source code. I'm still using the same link from Google maps for tests. [CODE] <!-- message --> <div id="post_message_27"><font face="Arial"><script type="text/javascript"> function checkURL() { if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;} if (url.indexOf('"')>=0) {return false;} if (url.indexOf("http://maps.google")!=0){return false;} return true } tot=''; tot_ini="<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=""; tot_no_quo=tot_ini.replace(/"/g,'"'); if(tot_no_quo.indexOf("http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;g eocode=FdJhmP4de304_Q&amp; ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=1 4&amp;iwloc=addr&amp;o utput=embed&amp;s=AARTsJrSb_gFa1Ssu_1wwOFTDbl5 gJKezg"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;hl=pt-BR&amp;q=Liberdade,+S%C3%A3o+Paulo+-+SP,+Brasil&amp;ie=UTF8&amp;cd=1&amp;g eocode=FdJhmP4de304_Q&amp; ll=-23.558323,-46.62529&amp;spn=0.036583,0.054932&amp;z=1 4&amp;iwloc=addr&amp;s ource=embed" style="color:#0000FF;text-align:left">Exibir mapa ampliado</a></small>"; tot_no_quo=tot_ini.replace(/"/g,'"'); if(tot_no_quo.indexOf("[url=")>0) { tot=tot_no_quo.substr(tot_no_quo.indexOf('[url="')+6,tot_no_quo.length);} else { tot=tot_no_quo.substr(tot_no_quo.indexOf('src="')+ 5,tot_no_quo.length);} url=tot.substr(0,tot.indexOf('"')); urlp=url.replace(/amp;/g,''); url=urlp; if (checkURL()) { document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>'); } else { document.write("<p><b>Endereço errado do Mapa, edite seu post para alterá-lo.</b></p>Recarregue a página quando verificar que está correto."); } </script></div> <!-- / message -->[/CODE] |
#61
|
|||
|
|||
Leo
You have to set the option "Disable BB Code Within This BB Code" to yes when you add the gmap code... I think the problem is that gmap takes as parameter {param} all the content you put between [gmap] and [/gmap], but if the url BBcode is also between [gmap] and [/gmap] other different {param} value is appeared and the gmap addon can't catch the value for the iframe, and the content appears 2 times, but without a valid value. There is no workaround with this I fear ... Despite of this, in my forums I use the WYSIWYG editor and I'm not having all these weird problems, I don't figure how this is happening if you verified those values Use {option}: -> No Remove Tag If Empty -> Yes Disable BB Code Within This BB Code -> Yes Disable Smilies Within This BB Code -> Yes Disable Word Wrapping Within This BB Code ->Yes |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|