68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > Admin Members
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#21)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,827
Join Date: Mar 2006
Location: Belmont, NC
Default 04-19-2006, 02:46 PM

It looks like it should work to me. However I think you may need to remove this:
PHP Code:
$results = array();
Since it is looping through the while it keeps reassigning it.
</span>


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#22)
Old
build build is offline
Member
build is on a distinguished road
 
Posts: 86
Join Date: Mar 2006
Location: Uk
Default 04-19-2006, 05:12 PM

Quote:
Originally Posted by Chaslie
Fair comment however ....



Exactly. Let's imagine YOU uploaded the 'unsatisfactory' pic then all of a sudden, saw it had dissappeared. What would a 'fool' do. Go and add it again!
Therefore, consider adding a clause in your site's terms and condition. You then hurt them in the pocket (because their listing has been deleted) rather then antagonize them buy 'replacing' or 'deleting' their pics without communicating a reason.
Hi Chaslie

Yes I agree BUT my problem will be that they will not PAY to post

When John or Eric has time to sort out how my site will run they will only PAY to reply to a post.

So you see it would not hurt their pocket


Regards

John

Useing Developer
Reply With Quote
(#23)
Old
build build is offline
Member
build is on a distinguished road
 
Posts: 86
Join Date: Mar 2006
Location: Uk
Default 04-20-2006, 10:52 AM

Quote:
Originally Posted by juven14
I was working on what you were requesting but just have ran out of time in my schedule. Have to start getting the apt ready for our new baby this week and have a few other commitments that will cut down on the time I spend in the forum for a few days.

Here is what I had at the last test. There is a problem with the second sSQL and I just didn't have time to look any further. Hopefully someone will spot my error or foolishness and finish this up.

administration/userimages.php (new file)
PHP Code:
require_once('includes/init.php');

$id=$_REQUEST['id'];

//select
$sSQL='SELECT id FROM '.PREFIX.'products WHERE owner='.$id;
$result=$db->query($sSQL);
while (
$row=$result->fetch())
{
    
//select
    
$sSQL2='SELECT * FROM '.PREFIX.'prodimages WHERE pid='.$row['id'];
    
$result2=$db->query($sSQL2);
    
$results = array();
    
$i=0;
    while (
$rs=$result2->fetch())
    {
        
$tmp = array(
            
'id' => $rs['id'],
            
'pid' =>$rs['pid'],
            
'title' => $rs['title'],
            
'image' => $rs['image'],
            );
        
$results[$i++] = $tmp;
    }    
}
$class_tpl->assign('results',$results);

$class_tpl->assign('body','userimages.tpl.php');
$class_tpl->display('layout.tpl.php');
userimages template - administration/templates/userimages.tpl.php (new file):
HTML Code:
{* User Images *} <table class="tableborder"> <tr> <th><img src="images/nav_m.gif" /> <strong>User Images</strong></th> </tr> <tr> <td></td> </tr> {foreach from=$results item=item} <tr> <td><a href="listinginfo.php?view={$item.pid}"><img src="../thumbs/small_{$item.image}" /></a><br />{$item.title}</td> </tr> {foreachelse} <tr> <td>This user has 0 images.</td> </tr> {/foreach} </table>
administration/users/userinfo.tpl.php:
HTML Code:
<a href="userimages.php?id={$member}">view user's images </a>
userinfo.php
PHP Code:
$class_tpl->assign('member',$member);
I think that was it. I had it calling 1 image from each listing before I realized I was doing it wrong, I tried this one time which left me with nothing. Maybe someone will look at my code in userimages.php and fix it.
Hi John

WOW did not know you was have little one
Oh Oh no time on here now John
Anyway I hope all goes well for you both.

John I have been having a go with the above
Two points

1) Where is the " userinfo.php"

2) Does it matter where in the scripts you put this code IE
administration/users/userinfo.tpl.php:


PHP Code:
<a href="userimages.php?id={$member}">view user's images </a>

Should that go in a certain place in that file?

3) Are you calling this from admin? if so what part.

I will test it some more then


Regards

John

Useing Developer
Reply With Quote
(#24)
Old
juven14 juven14 is offline
Moderator
juven14 has a spectacular aura about
 
Posts: 1,695
Join Date: Mar 2006
Location: NJ/NYC Area
Default 04-20-2006, 12:02 PM

Quote:
1) Where is the " userinfo.php"

2) Does it matter where in the scripts you put this code IE
administration/users/userinfo.tpl.php:
1.) administration/userinfo.php and all other files mentioned are within the administration folder. The template files are in templates/ and the rest will be in the main admin directory.

2.) No, I put it at the bottom next to the other buttons.

Also, besure to remove the line suggested by Eric.

Yes, already have a 4yr old son and our little girl will be here in a couple of weeks.


Regards,

John
mods.auscity.com
v3.1.5 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton
Reply With Quote
(#25)
Old
build build is offline
Member
build is on a distinguished road
 
Posts: 86
Join Date: Mar 2006
Location: Uk
Default 04-21-2006, 07:27 AM

Quote:
Originally Posted by juven14
1.) administration/userinfo.php and all other files mentioned are within the administration folder. The template files are in templates/ and the rest will be in the main admin directory.

2.) No, I put it at the bottom next to the other buttons.

Also, besure to remove the line suggested by Eric.

Yes, already have a 4yr old son and our little girl will be here in a couple of weeks.
Hi John

Ok done all the above all ok

I'm a bit confused to as were you call this from in admin

I have clicked on all in admin and nothing shows please can you tell me where you call it from admin

Unless I have not installed it correct


Regards

John

Useing Developer
Reply With Quote
(#26)
Old
juven14 juven14 is offline
Moderator
juven14 has a spectacular aura about
 
Posts: 1,695
Join Date: Mar 2006
Location: NJ/NYC Area
Default 04-21-2006, 07:34 AM

You added a link in from userinfo.tpl.php.

To access this link just browse user and click on info, then follow the link to all their photos


Regards,

John
mods.auscity.com
v3.1.5 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton
Reply With Quote
(#27)
Old
build build is offline
Member
build is on a distinguished road
 
Posts: 86
Join Date: Mar 2006
Location: Uk
Default 04-21-2006, 08:58 AM

Quote:
Originally Posted by juven14
You added a link in from userinfo.tpl.php.

To access this link just browse user and click on info, then follow the link to all their photos
Hi John

Why is it befor you post you look and look and look to make certain that you are not going to make a fool of your self, then after you have posted you find what you are asking about?

I found it right at the bottom of that page I had to scroll down the page.

Ok now I have ran it I get a error come up as

Quote:
[21-Apr-2006 13:50:44] PHP Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time. in C:\apache2triad\htdocs\68classifiedsv4\Connections \classifieds.php on line 21
I have looked at line 21

Code:
ini_set('session.use_trans_sid',0);
Yes I have taken Erics bit of code out


Regards

John

Useing Developer
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse Listings in Admin? garysr v3.1 Questions & Support 3 12-29-2006 08:14 PM
Admin Member's Browse Listings doug-gb v3.0 Questions & Support 2 10-03-2006 02:23 PM
Mod for checkout and admin control DVM v3.0 Modifications 0 08-22-2006 07:28 AM
Multiple Admin e1m2j Pre Sales 2 06-01-2006 04:20 PM
Admin Search Members ? free2take v3.1 Questions & Support 4 05-21-2006 02:32 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com