common solutions forum

Software Forum
The time is Mon Sep 06, 2010 8:21 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 Posts ] 
Author Message
 Post subject: How do I...
PostPosted: Thu Aug 23, 2007 11:42 pm 
Offline

Joined: Thu Aug 23, 2007 11:39 pm
Posts: 5
I love the csphonebook but can't figure out how to 1) change database fields and 2) how to change the listing on the (web) template. I would be very thankful if you could give me a tip or two on how to delete mobile phone, fax, and company fields and phone book listings for those three. Thank you.


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Tue Aug 28, 2007 2:21 pm 
Offline
Site Admin

Joined: Fri Oct 13, 2006 8:53 am
Posts: 14
Location: Bochum, Germany
To remove these fields you do not have to change the database. Just remove the fields from the display and data entry routines.

Of course, you need some very basic PHP and HTML knowledge to do this.

in details.php remove the fields you don't need from the <tr> to </tr>. Do the same in edit.php. You can also just change the input HTML tag to hidden. Example: <input name='fax' type='hidden' ...

_________________
common solutions


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Fri Sep 21, 2007 7:30 pm 
Offline

Joined: Thu Aug 23, 2007 11:39 pm
Posts: 5
Thank you.

I'm entering URL's in to fax field. Is there a way to automatically hyperlink the entry?
For example, in my listing I get:

Name: Jane, Smith
Website: http://www.common-solutions.de/
Email: jsmith@common-solutions.de

Is it possible to hyperlink Website and Email entries so that Website shows as
<a href="http://www.common-solutions.de/">http://www.common-solutions.de/</a>

and Email as

<a href="mailto:jsmith@common-solutions.de">jsmith@common-solutions.de</a>


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Mon Sep 24, 2007 2:29 pm 
Offline
Site Admin

Joined: Fri Oct 13, 2006 8:53 am
Posts: 14
Location: Bochum, Germany
You have already posted the solution ;-).

In the php file where the output is created just add the <a href....> and </a> before and after the field output.

Try this:
Replace
<td><? echo "$row[fax]"; ?></td>
with
<td><a href="<? echo "$row[fax]"; ?>"><? echo "$row[fax]"; ?></a></td>

Untested, maybe you will need to play with it. Hope the priciple is clear now.

_________________
common solutions


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Tue Sep 25, 2007 12:43 am 
Offline

Joined: Thu Aug 23, 2007 11:39 pm
Posts: 5
For some reason it's double linking. For example, if I enter www.common-solutions.de/user1 in fax field and code it as
<td><a href="<? echo "$row[fax]"; ?>"><? echo "$row[fax]"; ?></a></td>
it links to
http://www.common-solutions.de/www.comm ... s.de/user1

Wink The principle seems clear, I just don't understand the double-linking. help?


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Wed Sep 26, 2007 11:31 am 
Offline
Site Admin

Joined: Fri Oct 13, 2006 8:53 am
Posts: 14
Location: Bochum, Germany
Hard to tell what happens without seeing your source ;-). Try to replace the second php code with a text and see what happens. Looks like you need to find somebody to do the coding for you ;-). Please post the coding you did. You could also post a link to your site to let me see the result.

_________________
common solutions


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Wed Sep 26, 2007 6:00 pm 
Offline

Joined: Thu Aug 23, 2007 11:39 pm
Posts: 5
It's working now but I don't understand why
Code:
<a href=$fax>$fax
works, while proper
Code:
<a href="$fax">$fax
doesn't work. I did notice that echo statement starts with double " quote like this
Code:
<echo ">
$fax";

and that helped me figure this out. Why are those quotes in there? I'm just curious now. Everything is working.

Thank you again.


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Thu Sep 27, 2007 7:59 am 
Offline
Site Admin

Joined: Fri Oct 13, 2006 8:53 am
Posts: 14
Location: Bochum, Germany
Because the URL in the <a href="...">Blah</a> needs them ;-).

_________________
common solutions


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Fri Sep 28, 2007 6:31 pm 
Offline

Joined: Thu Aug 23, 2007 11:39 pm
Posts: 5
I spoke to soon. Everything works when I click on a letter or if I list all entries. What's broken is the search function. When I search for a name, the name gets listed, but hyperlinks get scrambled. What file should I edit to work on the search listing template?


 
 Profile  
 
 Post subject: Re: How do I...
PostPosted: Mon Oct 08, 2007 11:25 am 
Offline
Site Admin

Joined: Fri Oct 13, 2006 8:53 am
Posts: 14
Location: Bochum, Germany
The search option is in the index.php.

_________________
common solutions


 
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 Posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2002, 2006 phpBB Group
[ Time : 0.080s | 12 Queries | GZIP : Off ]