Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: contact list ??  (Read 18286 times)

0 Members and 1 Guest are viewing this topic.

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
contact list ??
« on: June 25, 2005, 11:03:43 am »

Hi,
I tried searching the forums  but I couldnt find anything so I've to make a new topic. If there is a post concerning this please redirect me. I was wondering what is the best way of putting a contact list kinda thing in cpg 1.3.x. I have a personal family site but not everyone is a member on it, however I still want to add their information so that people who are member can contact them in case they need to. It will not let me add an excel file ...but that would be my last resort anyway, if I cant find something a bit fancier.

My basic format is in the form of:

Name...Date of Birth.....Current Location...Webpage.....Email....Phone Number.

And although this might be a bit of a leap, but it would be ideal if a notification can be sent to all those whose email are listed when a birthday comes up....but once again this can wait till later, I simply want to put the list on first.

Would appreciate your input.
Thanks
Syed
« Last Edit: June 30, 2005, 05:02:47 am by GauGau »
Logged

Nibbler

  • Guest
Logged

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: contact list ??
« Reply #2 on: June 25, 2005, 07:23:25 pm »

May I say this has to be one of the most awesome support group I've ever seen !! Thanks sooo much for your input. I have yet to install it, so I'll let you know if I run in some kinda problem. A bit of a followup question I guess is how do I add the list page to the other links in cpg  like "Album List" "Last Upload" "Last Comments" "Most Viewed" etc. Also I only want people registered in cpg to access it and while I have that "You have to be registered to see access this page" thingy going on for the photos, is there a way I can do the same with this list page.
Thank you one more time, you have no idea how much time I've spent trying to come up with this on my own, and seeing it exactly the way I wanted it, just wants me to bow to you.
Syed

p.s. I would offer you some hugs and kisses but that would be kinda gayish, so I'm debating that right now, but if you were a girl, you'd be finding some turtle necks to hide all the hickeys.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: contact list ??
« Reply #3 on: June 25, 2005, 07:58:46 pm »

p.s. I would offer you some hugs and kisses but that would be kinda gayish, so I'm debating that right now, but if you were a girl, you'd be finding some turtle necks to hide all the hickeys.
Nibbler's PHP prowess turns me on, too.  :-* :D
Logged

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: contact list ??
« Reply #4 on: June 27, 2005, 03:59:53 pm »

Ok so I solved two of the problems that I asked.
I called my page list.php and added after the pageheader line
Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to login/register to access this page', __FILE__, __LINE__);
to only let user/admin view it.

Then to add a link to the conact list page, I did something very basic...and my question is if there's a better way to do this.
Basically in my theme.php I searched for
Code: [Select]
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
</td>
and added after it:
Code: [Select]
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="{CONTACTS_TGT}">{CONTACTS_LNK}</a>
</td>

then I searched for
Code: [Select]
'{SEARCH_TGT}' => "search.php",
 '{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
and added under that :
Code: [Select]
'{CONTACTS_TGT}' => "list.php",
'{CONTACTS_LNK}' => $lang_main_menu['contacts_lnk'],

Then in my english.php file I searched for
Code: [Select]
'search_lnk' => 'Search', and added
Code: [Select]
'contacts_lnk' => 'Contacts',
under it.
It works nicely, however as I was expecting this would mean changing all the themes individually. Is there another way of going about it?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: contact list ??
« Reply #5 on: June 27, 2005, 04:18:49 pm »

In 1.3, no. But 1.4 inclues a config to add a custom button with text and url.
Logged

Nibbler

  • Guest
Re: contact list ??
« Reply #6 on: June 27, 2005, 04:26:05 pm »

You can hardcode it directly in, so

Code: [Select]
<a href="{CONTACTS_TGT}">{CONTACTS_LNK}</a>
becomes

Code: [Select]
<a href="list.php">Contacts</a>
and then you don't need the steps after that. You need to modify all the themes though.

Also I have just updated the list mod.
Logged

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: contact list ??
« Reply #7 on: June 27, 2005, 06:35:00 pm »

Thanks Nibbler, hardcoding is a good advice...will save me some time. I looked at the updated list mod and have a suggestion to make. It's very unlikely that someone would want to rename the column, because if the column reads "Name" ..most likely people will put their name in the first place. What's more likely is that people would change their address/email/ph.no etc. But if there are too many column in the table, editing even one column of an entry would require entering the whole row again. Is there a way to add an "edit" button along with the delete button in the list, much like one in "categories" view in admin mode of cpg ??
Logged

Nibbler

  • Guest
Re: contact list ??
« Reply #8 on: June 27, 2005, 07:17:24 pm »

Fine, mod updated again  ::)
Logged

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: contact list ??
« Reply #9 on: June 30, 2005, 01:02:11 am »

 :-* *Smooch Smooch*  :-* Awesome work dude
Logged

syedali

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: contact list ??
« Reply #10 on: July 01, 2005, 11:00:10 pm »

Hi me again,
God I wished I knew anything other than C and wont be troubling you guys this much. Just wanna know if there's a way to upload photos as part of this contact list.....like a photo in one of the columns, so that it looks kinda like the link in hotmail contact page that goes "View this person's contact card" ?
Thanks
Syed
Logged
Pages: [1]   Go Up
 

Page created in 0.045 seconds with 21 queries.