contact list ?? contact list ??
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

contact list ??

Started by syedali, June 25, 2005, 11:03:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

syedali

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


syedali

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.

Tranz

Quote from: syedali on June 25, 2005, 07:23:25 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

syedali

Ok so I solved two of the problems that I asked.
I called my page list.php and added after the pageheader line
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

<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:

<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

'{SEARCH_TGT}' => "search.php",
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],

and added under that :

'{CONTACTS_TGT}' => "list.php",
'{CONTACTS_LNK}' => $lang_main_menu['contacts_lnk'],


Then in my english.php file I searched for 'search_lnk' => 'Search', and added '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?

Tranz

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

Nibbler

You can hardcode it directly in, so

<a href="{CONTACTS_TGT}">{CONTACTS_LNK}</a>

becomes

<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.

syedali

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 ??

Nibbler

Fine, mod updated again  ::)

syedali

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

syedali

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