[PHP-DB] Read more link with HTML code

2007-05-07 Thread Mike van Hoof

Hello list,

I got a problem with displaying content in a read more block which 
contains HTML code.

The problem is as followes:

I got a large piece of content, which contains HTML code (bui 
etc), but after 200 characters a read more link appears. At the moment I 
strip al the HTML out of this piece of content, and display the full set 
off content on another page.
But now i also want to display the bold text etc. in the first (200 
chrs) content block. The only problem i have here, is that when I got a 
bold tag opend in the first 200 chrs, and it's closed after 400 chrs, 
then the rest off the page is also bold.


somebody got a solution ?

Thanks for reading.

Mike

--
Medusa, Media Usage Advice B.V.
Science Park Eindhoven 5216
5692 EG SON
tel: 040-24 57 024  
fax: 040-29 63 567

url: www.medusa.nl
mail: [EMAIL PROTECTED]

Uw bedrijf voor Multimedia op Maat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Read more link with HTML code

2007-05-07 Thread James Gadrow
Hmmm... Perhaps you should think about separating the tags from the 
content? Do something like:


//Strip tags from content and add a few char hook to be used for 
re-insertion
//Count 200 chars (ignoring any hooks found while parsing and thereby 
not adding it to the char count)

//Make sure last char is a space or something appropriate
//re-insert tags over the hooks (count tags used  tags closed)
//close any inserted tags that aren't closed already in nested order

Mike van Hoof wrote:

Hello list,

I got a problem with displaying content in a read more block which 
contains HTML code.

The problem is as followes:

I got a large piece of content, which contains HTML code (bui 
etc), but after 200 characters a read more link appears. At the moment 
I strip al the HTML out of this piece of content, and display the full 
set off content on another page.
But now i also want to display the bold text etc. in the first (200 
chrs) content block. The only problem i have here, is that when I got 
a bold tag opend in the first 200 chrs, and it's closed after 400 
chrs, then the rest off the page is also bold.


somebody got a solution ?

Thanks for reading.

Mike




--
Thanks,

Jim

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] [sory] Re: [PHP-DB] Re: [PHP-WIN] automatic-click flash?

2007-05-07 Thread Chetan Graham

Bedul wrote:
sorry.. that's pure my fault.. i should type for php-win
my mail setting are always to send to php-db

that's wont happen again

 Why do you keep cc'ing the php-db list with responses
 that have nothing
 to do with the list?


What is so funny Bedul, is the very next post after this apology of
yours for loving your PHP.mail.lists has nothing to do with DB's...
it's is about HTML code. So on it goesI've always enjoyed your upbeat
attitude about different peoples needs in the php.mail.lists.
Bravo Bedul.

http://news.php.net/php.db/43555  HTML question in the DB list.

There have to be rules in mail forums. Yes, but once started it
becomes a living thing that works just fine.  Sure, lets limit the
straying into 'other' zones where it would be better posted in the
'correct' one.
But, lets also be reasonable.

I've seen the most objectionable items in this list that have nothing
to do with DB's , somehow a door gets left open and the undercurrents
of the world come in uninvited.

Let us try to see the good in every action,
Blessings,
Chetan

Why even a broken clock is correct twice a day!

I've also noted nobody posts to them as well.  Is anybody hurt? who knows.
 I doubt it.  And certainly Bedul's posts are fine.

Has anyone ever noticed that when too many rules are enforced that people
walk away?


  http://news.php.net/php.db/43555

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Read more link with HTML code

2007-05-07 Thread itoctopus
Put your 200 characters in a table block:
table
tr
td
Your 200 characters
/td
/tr
/table

-- 
itoctopus - http://www.itoctopus.com
Mike van Hoof [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello list,

 I got a problem with displaying content in a read more block which 
 contains HTML code.
 The problem is as followes:

 I got a large piece of content, which contains HTML code (bui etc), 
 but after 200 characters a read more link appears. At the moment I strip 
 al the HTML out of this piece of content, and display the full set off 
 content on another page.
 But now i also want to display the bold text etc. in the first (200 chrs) 
 content block. The only problem i have here, is that when I got a bold tag 
 opend in the first 200 chrs, and it's closed after 400 chrs, then the rest 
 off the page is also bold.

 somebody got a solution ?

 Thanks for reading.

 Mike

 -- 
 Medusa, Media Usage Advice B.V.
 Science Park Eindhoven 5216
 5692 EG SON
 tel: 040-24 57 024  fax: 040-29 63 567
 url: www.medusa.nl
 mail: [EMAIL PROTECTED]

 Uw bedrijf voor Multimedia op Maat 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: Read more link with HTML code

2007-05-07 Thread Chris

itoctopus wrote:

Put your 200 characters in a table block:
table
tr
td
Your 200 characters
/td
/tr
/table



How is that going to help?

It's still going to have a b or i tag in there which is going to 
flow to the next section.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL5037srv//PHP522//WIN2KSP4//IISV5//***MySQL ERRORS

2007-05-07 Thread Chetan Graham
Hi to All,

I am having problems with the MySQL DB.  It started with this command from
a call in a PHP script...

INSERT INTO docprouser (id,valid,password)VALUES
('user5','Y',md5('ksobhinyai')); or die(mysql_error());

The script actually connects with the DB fine and no errors at all.  You
can see the screen output in the attatched text file.  However, there is
no new entry in DB.

Upon looking at the error log for the specified time I get:

**Query Execute Thread cannot connect to MySQL **

However, if I cut/paste the above into the query window of GUI it executes
just fine, and shows the record written.

I've dnloaded the latest OBDC connector and set up correctly.
I've googled the MySQL errors to no avail.
TCP/IP is active on pc.
The tables were even created with this script.

I'm beyond frustrated, as two days now have been stuck with this DB
problem.  I just spent the last five or six hours deleting the DB off the
server and reloading it several times which cleared up several previous
problems.  Now, it comes down to this one.

Any help would be appreciated.
Blessings,
Chetan?php
//$dtime = gmdate(D , M j, Y, g:ia, time()+(19800));
  $dtime = gmdate(g:ia, time()+(19800));
  $db = aims site;
  $con = mysql_connect('localhost','root','pull3799') or 
die(mysql_error());
   echo h3-ONE-Connected to Server!nbsp$dtime/h3;
  
  
  if (!mysql_select_db($db,$con)){
   echo Unable to select aims site DBbr . mysql_error();
 exit;
  }echo h3-TWO-Connected to aims site DB!nbsp$dtime/h3; 
 
 
//*
 //-- JUST TRYING TO STUFF DATA INTO DB,  TO SEE IF IT WORKS
 
//*
 //--  AS PROCESS IN WRITING LARGER PROGRAM
 
//*
 

 mysql_query(CREATE TABLE IF NOT EXISTS docprouser ( 
 p_id int(11) NOT NULL auto_increment, 
 id varchar(20), 
 valid enum('y','n'), 
 password BLOB null, 
 timeEnter timestamp, 
 PRIMARY KEY (p_id)
 )
 ENGINE=MyISAM COMMENT='logon user  password';) or die('Create 
Died' . mysql_error());
 
 echo h3-THREE-Step before data insertion into docprouser 
table!nbsp$dtime/h3;


  INSERT INTO docprouser 
(id,valid,password)VALUES('user5','Y',md5('ksobhinyai')); or 
die(mysql_error()); INSERT INTO docprouser 
(id,valid,password)VALUES('admin','Y',md5('srimatre')); or die(mysql_error());
 INSERT INTO docprouser (id,valid,password)VALUES
 
('user1','Y',md5('lalitambikayai')); or die(mysql_error());
 INSERT INTO docprouser 
(id,valid,password)VALUES('user2','Y',md5('hrdyayai')); or die(mysql_error());
 INSERT INTO docprouser 
(id,valid,password)VALUES('user3','Y',md5('ramyayai')); or die(mysql_error());
 INSERT INTO docprouser 
(id,valid,password)VALUES('user4','Y',md5('avaradayai')); or 
die(mysql_error());
 INSERT INTO docprouser 
(id,valid,password)VALUES('user5','Y',md5('ksobhinyai')); or 
die(mysql_error());
 
 echo h3-FOUR-Inserted data into docprouser 
table!nbsp$dtime/h3;
 
if ($query=SELECT id, password FROM docprouser WHERE 'valid' = 
'y') {
   $result = mysql_query($query);
 while ($logdata = mysql_fetch_row($result)) {
print($logdata[0] $logdata[1]br\n);
break;
   }
}
else   {
echo h3-FIVE-There is no data in docprouser table!  We 
have a problem???!nbsp$dtime/h3; 
break;
   }


 echo 'pCongratulations, database or table(s) have been 
created!/p
 pYou may now read the latest mail a 
href=http://news.php.net/group.php?group=php.db;PHP.NET/a/p';
?
**
BELOW IS THE SCREEN OUTPUT FROM ABOVE PHP PROGRAM
**

-ONE-Connected to Server!10:52am
-TWO-Connected to aims site DB!10:52am
-THREE-Step before data insertion into docprouser table!10:52am
-FOUR-Inserted data into docprouser table!10:52am

Congratulations, database or table(s) have been created!

You may now read the latest mail PHP.NET
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php