1 lovesensualitydevoti Aug 18, 2005 21:48
3 jinbrother1 Aug 23, 2005 21:44
4 jinbrother1 Aug 23, 2005 21:56
Does anyone know how to display the popup page at the very top of the window instantly?
My comments appear in a new window and whenever I click on "leave a comment", my comment page opens up half way down to the comments box. I want the window to open up from the very top.
I tried using:
<script type="text/javascript">
function scrollWindow()
{
window.scrollTo(0,0)
}
</script>
but I want the content to open up at the top instantly. I'm sure there's a code of some sort. Please help me. Thanks in advance!
5 graham Aug 23, 2005 23:25
I looked at the [url=http://doc.b2evolution.net/0.9.0/evocore/_blogs_b2evocore__functions_comments_php.html#functioncomments_popup_script]tech docs[/url], but I can't see anything that will do this without hacking core files. If it bothers you that much, the place to look in is b2evocore/_functions_comments.php
6 jinbrother1 Aug 23, 2005 23:59
That's fine. Thanks for your help Graham. I do have another question, and I'm sure you've already heard this before (I ran across one of your old post regarding this issue, but I still can't figure it out).
I did some editing on my comment_post.php and I added:
<link rel="stylesheet" href="style_2.css" type="text/css" />
<body background="img/background(theme)3.gif">
<table border="0" cellspacing="0" cellpadding="10" style="border-collapse: collapse" width="100%" height="100%" id="table1">
<tr>
<td>
<table border="0 " cellspacing="0" cellpadding="10" style="border-collapse: collapse" width="100%" id="table2">
<tr>
<td bgcolor="#FFFFFF">
before the <?php sign to spice up my comment_page. But now, whenever I post a comment, I get this error message:
Warning: Cannot modify header information - headers already sent by (output started at /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php:10) in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 211
Warning: Cannot modify header information - headers already sent by (output started at /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php:10) in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 212
Warning: Cannot modify header information - headers already sent by (output started at /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php:10) in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php:10) in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php:10) in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 218
I don't have any spaces or blank lines after the ?> sign . I'm wondering whether the code I added before the <?php has anything to do with it. And if that is the case, how can I add that code elsewhere in the comment_page.php so there is no error? Thanks in advance again!
7 graham Aug 24, 2005 00:07
Did you take out your change to see if that's the problem? If it is, just put the code in an echo directly after the opening <?php
I'd still say there's some whitespace though... B)
8 jinbrother1 Aug 24, 2005 00:12
Yes, I removed the change and the error message disappeared. Can you please tell me how to add the change in an echo? I'm not that familiar with PHP. Thanks a lot for your help.
9 graham Aug 24, 2005 00:29
<?php echo'your stuff goes here';?>
You can just put the eacho'blah' in after the opening <?php though.[/code]
10 jinbrother1 Aug 24, 2005 00:47
I copied/pasted:
<link rel="stylesheet" href="style_2.css" type="text/css" />
<body background="img/background(theme)3.gif">
<table border="0" cellspacing="0" cellpadding="10" style="border-collapse: collapse" width="100%" height="100%" id="table1">
<tr>
<td>
<table border="0 " cellspacing="0" cellpadding="10" style="border-collapse: collapse" width="100%" id="table2">
<tr>
<td bgcolor="#FFFFFF">
exactly into "your stuff goes here". But I still get new error:
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/jinbro1/public_html/jinbrother1/blog/htsrv/comment_post.php on line 2
Heh, I knew it wouldn't be that quick and simple. What am I doing wrong? Sorry for sounding like an idiot.
11 graham Aug 24, 2005 08:56
I'm stumped. Why exactly do you want to put this here? In normal operation (i.e. when there's no errors), you should never see this page.
Link? Can't do anything without looking at a page...