2 Bugs In ViewTopic »  Show posts from    to     

Icy Phoenix


Old Bugs - 2 Bugs In ViewTopic



Gomesh [ Mon 21 Aug, 2006 00:52 ]
Post subject: 2 Bugs In ViewTopic
Hi All. I've found 2 probable bugs in XS 0.58.

1) In Vievtopic, when i see a post from a user and click on #numer_of_post in a thread, the popup isn't opened for the reading of the Post of author;

2) In Vievtopic, when i click on "View Message" in quote popup isn't opened for the reading original message quoted.

cYa All.


Bicet [ Mon 21 Aug, 2006 13:06 ]
Post subject: Re: 2 Bugs In ViewTopic
1st: I cannot reproduce the bug it seems to work here...

2nd: Where do you see view message?


Gomesh [ Mon 21 Aug, 2006 14:52 ]
Post subject: Re: 2 Bugs In ViewTopic
Hi Bicet:

This's a partial Bug of 0.58 Final:

In ACP > Board > Enable Quick Quote = If Yes is checked the popup when you click on # (Bottom avatar that it represents the number of the post of that Thread) and on the "View Message" in a quoted message they are opened normally.

In ACP > Board > Enable Quick Quote = If No is checked the popup when you click on # (Bottom avatar that it represents the number of the post of that Thread) and on the "View Message" in a quoted message they aren't opened normally.

I've found this bug in tamplates/ca_aphrodite/viewtopic_body.tpl, where i see:

Go to line #66

Code: [Hide] [Select]
<!-- BEGIN switch_quick_quote -->
<script language="Javascript" type="text/javascript">
<!--

message = new Array();
<!-- END switch_quick_quote -->


Go to line #74

Code: [Hide] [Select]
<!-- BEGIN switch_quick_quote -->
message[{postrow.U_POST_ID}] = " user="{postrow.POSTER_NAME_QQ}" post="{postrow.U_POST_ID}"]{postrow.PLAIN_MESSAGE}[/";
<!-- END switch_quick_quote -->


Go to line #79

Code: [Hide] [Select]
<!-- BEGIN switch_quick_quote -->
function addquote(post_id, tag)
{
document.getElementById('quick_reply').style.display="";
str_find = new Array("&lt_mg;", "&gt_mg;")
str_replace = new Array("<", ">")
for(var i = 0; i < message[post_id].length; i++)
{
for (var j = 0; j < str_find.length; j++)
{
if (message[post_id].search(str_find[j]) != -1)
{
message[post_id] = message[post_id].replace(str_find[j],str_replace[j]);
}
}
}
document.post.message.value += "[" + tag + message[post_id] + tag + "]";
document.post.message.focus();
return;
}

function quotename(username)
{
document.getElementById('quick_reply').style.display="";
document.post.message.value += username;
document.post.message.focus();
return;
}

function open_postreview(ref)
{
height = screen.height / 2.23;
width = screen.width / 2;
window.open(ref, '_phpbbpostreview', 'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes');
return;
}
//-->
</script>
<!-- END switch_quick_quote -->


Now: if in these three parts of code you cancel only these 2 lines:

<!-- BEGIN switch_quick_quote -->

<!-- END switch_quick_quote -->

the popup works, if in In ACP > Board > Enable Quick Quote is checked "Yes" or "Not".

cYa.


Tom [ Tue 22 Aug, 2006 13:26 ]
Post subject: Re: 2 Bugs In ViewTopic
Without having looked at the code, you should try the following:
Code: [Hide]
  1. <!-- BEGIN switch_quick_quote -->  
  2. function addquote(post_id, tag)  
  3. {  
  4. document.getElementById('quick_reply').style.display="";  
  5. str_find = new Array("&lt_mg;", "&gt_mg;")  
  6. str_replace = new Array("<", ">")  
  7. for(var i = 0; i < message[post_id].length; i++)  
  8. {  
  9. for (var j = 0; j < str_find.length; j++)  
  10. {  
  11. if (message[post_id].search(str_find[j]) != -1)  
  12. {  
  13. message[post_id] = message[post_id].replace(str_find[j],str_replace[j]);  
  14. }  
  15. }  
  16. }  
  17. document.post.message.value += "[" + tag + message[post_id] + tag + "]";  
  18. document.post.message.focus();  
  19. return;  
  20. }  
  21.  
  22. function quotename(username)  
  23. {  
  24. document.getElementById('quick_reply').style.display="";  
  25. document.post.message.value += username;  
  26. document.post.message.focus();  
  27. return;  
  28. }  
  29. <!-- END switch_quick_quote -->  
  30. function open_postreview(ref)  
  31. {  
  32. height = screen.height / 2.23;  
  33. width = screen.width / 2;  
  34. window.open(ref, '_phpbbpostreview', 'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes');  
  35. return;  
  36. }  
  37. //-->  
  38. </script> 


Gomesh [ Tue 22 Aug, 2006 17:09 ]
Post subject: Re: 2 Bugs In ViewTopic
It does not works, and bottom of header, i all Threads, i see this part code:

Code: [Hide] [Select]
function open_postreview(ref) { height = screen.height / 2.23; width = screen.width / 2; window.open(ref, '_phpbbpostreview', 'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes'); return; } //-->


cYa All.


AvrilBoi [ Tue 22 Aug, 2006 17:30 ]
Post subject: Re: 2 Bugs In ViewTopic
Gomesh wrote: [View Post]
cancel only these 2 lines:

<!-- BEGIN switch_quick_quote -->

<!-- END switch_quick_quote -->

I solved with this...


Tom [ Tue 22 Aug, 2006 21:00 ]
Post subject: Re: 2 Bugs In ViewTopic
Gomesh wrote: [View Post]
cancel only these 2 lines:

<!-- BEGIN switch_quick_quote -->

<!-- END switch_quick_quote -->

By removing these 2 lines you'll still have the entire JavaScript for QQ in viewtopic and the reason for the switch to disable QQ is void. If you have long topics with alot of text, you'll have all the text there twice. Once in viewtopic and once in the QQ JS.
The only reason for this switch was to allow reducing the size of viewtopic so pages may load faster. That means, removing those 2 lines does not fix the bug.


AvrilBoi [ Tue 22 Aug, 2006 21:52 ]
Post subject: Re: 2 Bugs In ViewTopic
Tom wrote: [View Post]
Gomesh wrote: [View Post]
cancel only these 2 lines:

<!-- BEGIN switch_quick_quote -->

<!-- END switch_quick_quote -->

By removing these 2 lines you'll still have the entire JavaScript for QQ in viewtopic and the reason for the switch to disable QQ is void. If you have long topics with alot of text, you'll have all the text there twice. Once in viewtopic and once in the QQ JS.
The only reason for this switch was to allow reducing the size of viewtopic so pages may load faster. That means, removing those 2 lines does not fix the bug.

Ok... I've re-put the lines <!-- BEGIN switch_quick_quote --> and <!-- END switch_quick_quote --> where they were, and I added <!-- END switch_quick_quote --> where you wrote, but this doesn't solve
Gomesh wrote: [View Post]
It does not works, and bottom of header, i all Threads, i see this part code:

Code: [Hide] [Select]
function open_postreview(ref) { height = screen.height / 2.23; width = screen.width / 2; window.open(ref, '_phpbbpostreview', 'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes'); return; } //-->


cYa All.

I do too, but just on top of survey topics


Tom [ Wed 23 Aug, 2006 11:29 ]
Post subject: Re: 2 Bugs In ViewTopic
I have to take a closer look at this to fix it. I need to split the function open_postreview from the QQ functions so QQ can be disabled without disabling postreview.


Mighty Gorgon [ Sun 27 Aug, 2006 16:02 ]
Post subject: Re: 2 Bugs In ViewTopic
Here is the correct file.

Thanks Gomesh for reporting it... you're one of the best BUGS Hunter here... always precise. Nice to have users like you.


dinoyoco [ Mon 28 Aug, 2006 17:39 ]
Post subject: Respuesta: FIXED -2 Bugs In ViewTopic
This patch is including in patch 058_006?

Bye


Mighty Gorgon [ Mon 28 Aug, 2006 23:35 ]
Post subject: Re: FIXED -2 Bugs In ViewTopic
Yes... it should...

Anyway in few days will be out a big update for XS... so you won't miss this...




Powered by Icy Phoenix