You are here: Re: How best to highlight an an item... « HTML « IT news, forums, messages
Re: How best to highlight an an item...

Posted by BootNic on 08/24/07 14:46

dorayme <doraymeRidThis@optusnet.com.au> wrote:
news:doraymeRidThis-B7931F.18514624082007@news-vip.optusnet.com.au:

[snip]
> I have been a bit shy of saying this, I like your idea and now
> that I am well under way to finishing all the basics on the page
> I have been working on (a lot of it involved sorting out artwork
> and zipping the packages up) I am ready for the "enhancement" of
> this highlighting business. But when I came to _actually_ do it,
> I am finding it none too easy. I thought it would be easy given
> your source code and all. My page is .html for a start. The
> server it is going to is set to process any php code, includes
> etc on .html pages. So is my home server.
>
> What is the very first thing I need to do to adapt it to my page?
> Suppose that <http://tinyurl.com/24y5hp> is a reasonable
> simplified model. What are the steps I need to take please?
[snip]

There is usually more then one way to go about it all. However I need more
information, as I only have access to what is rendered by php, I would
really need to see the php source to give a reasonable suggestion.

Specifically I need to know how the list of links and table are generated,
in order to assign the class to them. In my example the table and link is
checked during the assembly and if a match is found a class is added. If
the links and table are not assembled by php then a search and replace
could be used to assign a class to them.

The redirection part of my example could be added to the top of the page
and do its thing independent of the part that assigns the class to the
desired elements.

If your example is php, then you could add just a bit of code to the page
to display the php source such as I have in my example.

What I use to display the php source follows:
<?php
$this_page = file_get_contents($_SERVER["SCRIPT_FILENAME"]);
echo '<div style="margin-top:2em;"><table summary="" style="border:solid
1px #008000;">
<caption style="margin:auto;text-align:left;border:solid 1px #008000;
padding:0.3em;">PHP SOURCE</caption>
<tbody>
<tr>
<td style="color:#4169E1; background-color:#FFFFE0;"><pre>'.
htmlentities($this_page).
'</pre></td>
</tr>
</tbody>
</table></div>';
?>

Take the precaution to ensure that you do not expose any user name or
password that may be in the php file.

--
BootNic Friday August 24, 2007 10:46 AM
Every time I close the door on reality it comes in through the
windows.
*Jennifer Unlimited*

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация