WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Just Upgraded, I have 2 problems

Version:
printPrint


Just Upgraded, I have 2 problems
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004
Total Topics: 20
Total Posts: 83
Posted 08/06/05 - 02:13 PM:
quote post
#1
Well that was a LOT easier than I thought it would be. I'm still checking everything but, seems pretty oK. I left several of the member templates in place from 2.15, they seem to work oK. Only have two problems that I can see:

1. Existing member's album images are not showing. I figure that's because I need to run the attachments importer from upgrade.php (as it says in the readme). The problem is there is no link to it when I load upgrade.php (I've upgraded twice looking for the link and searched everywhere in the admin panel for it). I found attachimport.php and tried to run it from the browser while logged in, that didn't work. All avatars are still linked properly. How can I reassociate member images?

2. A member function you helped me with is no longer working (several other custom functions work fine). When I add the function to the members class, the page fails to load. Here's the function:

function age() {
$bits = explode('-', $this->birth_date);
$this->birthyear = $bits[0];
$this->birthmonth = $bits[1];
$this->birthday = $bits[2];
if ($this->birthyear == '0000') return '0';
$t = adjusttotimezone(time());
$thisyear = strftime("%Y", $t);
$thismonth = strftime("%m", $t);
$thisday = strftime("%d", $t);
$age = $thisyear - $this->birthyear;
if ($this->birthmonth > $thismonth) $age -= 1;
if ($this->birthmonth == $thismonth && $this->birthday > $thisday) $age -= 1;
return $age;
}

Only other thing is that my admin panel still shows 2.15 in the header, should it have changed to 2.2?

Thanks!

Edited by knotworking on 08/06/05 - 09:04 PM
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 6014
Posted 08/07/05 - 03:53 PM:
quote post
#2
1. To check if it needs to show the link, it checks if there are any records in the wsngallery_links table where the filename field isn't blank. Perhaps they're all blank for you... but that would mean you don't have any old-style attachments. Check phpmyadmin.

Actually you mentioned you're using some old templates. If you use old templates, that will cause none of your images to show. That's why it says to overwrite templates.

2. Don't add the function. There's already an age() function.

3. You must not have overwritten all of the files. Says 2.21 for me, as dictated by scriptinfo.php.

Edited by Paul on 08/07/05 - 03:58 PM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004
Total Topics: 20
Total Posts: 83
Posted 08/08/05 - 01:18 PM:
quote post
#3
Everything in my modified albums.tpl is working fine, except for the links. I searched all the filename fields and, they're all full with file names. Can you look at the code below and see what might be causing the images not to load in the ablum template:

<!-- BEGIN REGULAR IMAGES --><td valign="top" class="link" align="center" width="230"><IF {THISMEMBERCANREMOVE[{IMAGEOWNERID}]}><strong><a href="albums.php?action=remove&linkid={IMAGEID}&catid={CATID}">DELETE THIS IMAGE</a></strong></IF><br><br><img src="thumbnail.php?id={IMAGEID}" alt="{IMAGEBOOKMARKTITLE}" onClick="window.open('download.php?id={IMAGEID}', 'Image_Display', 'width=<?php echo {IMAGEXWIDTH} + 20; ?>,height=<?php echo {IMAGEYHEIGHT} + 28; ?>,left=0,top=0,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=1')" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor='auto'"><p>{IMAGEDESCRIPTION}</p></td><!-- END REGULAR IMAGES -->

I tried removing the above and inserting the default code (I even overwrote once with the new tpl to see if that would call the album images) from 2.2 but, it's not displaying anything, either (actually, it displays the {variable names}, which means I am trying to call variables that aren't accessible).

I am using a links toplist that is calling thumbs like above and linking member albums just fine.

Thanks for you time!
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 6014
Posted 08/08/05 - 02:57 PM:
quote post
#4
I can't read what you wrote since you didn't format it, but this is what the template uses:
<!-- BEGIN REGULAR IMAGES -->
<td {IMAGEWIDTH} valign="top" class="link" align="center">
<!-- <IF {IMAGECANREMOVE}>[<a href="albums.php?action=remove&linkid={IMAGEID}&catid={CATID}">Remove</a>]<br></IF> -->

<IF {SWITCH_TITLES}><a href="{IMAGEDETAILSURL}">{IMAGETITLE}</a><br></IF>

<a href="{IMAGEDETAILSURL}"><img src="{IMAGETHUMBURL}" border="0" {BORDEREFFECT} {MOUSEOVEREFFECT} alt="{IMAGEBOOKMARKTITLE}"></a>

<br> {IMAGENEW} {IMAGEISUPDATED} {IMAGEADMIN}

<IF {SWITCH_RATINGS} and {IMAGEVOTES}><br>{IMAGESTARS} <br>{IMAGERATING}/{MAXVOTE} based on {IMAGEVOTES} votes and {IMAGEHITS} views</IF>
<br><IF {SWITCH_COMMENTS}><a href="comments.php?id={IMAGEID}">Comments (<IF {IMAGECOMMENTSREAD}>{IMAGENUMCOMMENTS}<OTHERWISE><b>{IMAGENUMCOMMENTS}</b></IF>)</a> </IF>

<br>Submitted {IMAGEDATE}
<IF {IMAGELASTEDIT} is greater than {IMAGETIME}> and edited {IMAGELASTEDITDATE}</IF>
</td>
<!-- END REGULAR IMAGES -->


And this is what it looks like in action: http://gallery.philosophyforums.com/albums.php?catid=5

Edited by Paul on 08/08/05 - 03:30 PM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.