Welcome to Geeklog, Anonymous Tuesday, March 19 2024 @ 06:25 am EDT

Geeklog Forums

newly geeked


Anonymous

Anonymous
I'm newly geeked and have a number of customizatoins installed. check it out at cliffandkim.org in particular i have customized: 1. installed gallery 2. installed filemngmnt 3. installed mycal 4. customized what's new block 5. configured htmlarea and modified story editing page. i've allowed anons to post stories, but please choose the 'testing' topic Also I hvae customized htmlarea with PHPuploadManager, which lets admins insert pictures by providing a dialog that supports uploading images from your local machine. works great. meecect@bp.com
 Quote

Anonymous

Anonymous
Are you playing around with your website? I'm getting this error with no display: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/rdadmin/www/index.php on line 28
 Quote

Anonymous

Anonymous
What did you change with the 'What's New' block? Can you post the changes here?
 Quote

Anonymous

Anonymous
yeah. I host multiple sites from the same directory and I have an index.php that checks the HTTP_HOST variable and redirects visitors to a sub-directory. so www.cliffandkim.org redirects to www.cliffandkim.org/ck but... I made a change to index.php and didn't test it. I was already accessing the site at it's real address so i didn't notice. It should be fixed now.
 Quote

Anonymous

Anonymous
i added the following to config.php: // Set to 1 to hide a section from the What's New block: $_CONF['hidenewstories'] = 0; $_CONF['hidenewcomments'] = 0; $_CONF['hidenewlinks'] = 0; // new, added by ctm $_CONF['hidenewpictures']=0; that let's you enable/disable the display. then edit lib-common.php to include much of the code for the 'gallery-last-updated' hack: near the variable declarations: // added this stuff to try and get last updated pictures in the whats new box global $GALLERY_BASEDIR; global $cacheName; global $cacheDate; global $cacheRealName; global $albumName; global $gallery; ( you might want to define $GALLERY_BASEDIR in config.php ) and then add the following code after the '$retval .= COM_startBlock( $titl....' part: if ( $_CONF['hidenewpictures'] == 0 ) { // Any recent pictures ? $retval .= '<b>' . $LANG01[109] . '</b><br>'; define(Update_CACHE_FILE, "/tmp/block-updates.cache"Wink; // here we rebuild the cache file every 6 hours (21600 seconds) define(Update_CACHE_EXPIRED, 21600); require_once($GALLERY_BASEDIR ."init.php"Wink; include_once($_CONF['path_html'] . "/last-updates.php"Wink; if ($profile) { $timer = time(); } /* Initializing the seed */ srand ((double) microtime() * 1000000); // Check the cache file to see if it's up to date $rebuild = 1; if (fs_file_exists(Update_CACHE_FILE)) { $stat = fs_stat(Update_CACHE_FILE); $mtime = $stat[9]; if (time() - $mtime < Update_CACHE_EXPIRED) { $rebuild = 0; } } if (($_USER['uid'] < 1)) { if ($rebuild) { scanUpdateAlbums(); saveUpdateCache(); } else { readUpdateCache(); } } else { readUpdateCache(); } $albumDB = new AlbumDB(); $gallery->session->albumName = ""; $numAlbums = $albumDB->numAlbums($gallery->user); $numPhotos = $albumDB->numPhotos($gallery->user); $retval .= "("; $retval .= $numPhotos; $retval .= "&nbsp;photos in&nbsp;"; $retval .= $numAlbums; $retval .= "&nbsp;albums)<br>"; // for loop reads the data from the arrays and renders it on screen for ($i = 0; $i < $numAlbums; $i++) { $albumURL = makeGalleryUrl($cacheName[$i]); $retval .= "<a href=" . $albumURL . " >" . $cacheRealName[$i] . "</a>"; $retval .= "<br> last updated: " . $cacheDate[$i] . "<br>"; } //$retval .= $LANG01[110] . '<br>'; $retval .= '<br>'; } I also modified the code a little further down to include an extra <br> in certain parts, becuase if there no new comments or stories, items are separated by a <BR>, but if there are new comments/stories, then items 'cram next to each other. Look at the code, it's pretty simple to find where you need the <br>
 Quote

Anonymous

Anonymous
BTW, I am now working on integrating OScommerce. I understand that many people are interested in this.
 Quote

cliffmeece

Anonymous
i decided to create an account here as I think I'll be posting frequently.
 Quote

Anonymous

Anonymous
Now, I'm getting this error and no display Frown Warning: Cannot add header information - headers already sent by (output started at /home/rdadmin/www/index.php:2) in /home/rdadmin/www/index.php on line 18
 Quote

cliffmeece

Anonymous
that's weird. I am playing with the site, but my 'outages' should be brief. Coincidence maybe? I just killed my browser and deleted cookies and tried the initial link that i posted and it seem sto work. I'll stop fiddling for awhile if you can try it and tell me if you still get an error. If you do I'd like to investigate.
 Quote

Anonymous

Anonymous
I tried a third time and am still getting an error: Warning: Cannot add header information - headers already sent by (output started at /home/rdadmin/www/index.php:2) in /home/rdadmin/www/index.php on line 18 If it helps out any, I'm using IE 6 (without sp1) on Win98.
 Quote

Anonymous

Anonymous
You're not even getting to the GL site. You're getting stuck on my index page that does dynamic redirection. it seems that you're browser is choking on the header send request. The line of code is: if ($HTTP_HOST == "www.cliffandkim.org" || $HTTP_HOST == "cliffandkim.org"Wink { header("Location: /c+k/"Wink; exit; } This doesn't seem to a be affecting other visitors to the site though. I you want to check the site out, try the full URL at: http://www.cliffandkim.org/ck/
 Quote

Anonymous

Anonymous
Okay, fourth time is a charm. I can now finally get to your site using the index page. Did you change anything? Or maybe it has something to do with the number of visitors hitting the page at the same time?
 Quote

Anonymous

Anonymous
somebody was asking how i did the redirect, so i was in the middle of sending him the code when it statred to really bug me that it wasn't working right. So i did a search on google and found the following gem. If you have a page that starts with _anything_ before the initial '<?php', then you can't resend the headers (although this seems to be a bit browser specific ), so in my code, '<?php' was on line two, below a blank line. I deleted the blank line and now all is golden.
 Quote

All times are EDT. The time is now 06:25 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content