Jump to content

apollo168

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

apollo168's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hahaha, dang it! The ultimate call out! :-) It seems to be working awesome, thanks man!!!
  2. That does a nice job at checking if you're in HTML, but what about if the text gets truncated and you leave a tag hanging open without including it's close tag? For example, if you had truncated in between your <strong> tags, everything after that preview article would be in bold...
  3. I also posted this in the PHP Help thread, but I have a feeling it's going to get run to the bottom before anyone can help... http://www.phpfreaks.com/forums/index.php/topic,134055.0.html Basically I have some text that has HTML tags in it. I want to truncate the text (for previewing articles), but if I just use substr() it will truncate in the middle of HTML tags. That's not good when the text gets displayed. I don't know too much about regex, but I imagine it could prove useful in this situation. I would like to get the text truncated to 320 characters of plain text, not including HTML tags. Does anyone have any ideas how to do this? Am I missing a tutorial out there somewhere?
  4. Basically I have some articles written with a WYSIWYG editor that are stored in the DB with the HTML tags. I successfully call the DB to get my text, and I want to truncate the length of the text to a certain point for showing preview articles. My problem is that simply using substr() can sometimes chop off the string in the middle of an HTML tag leaving a nasty mess. Does anyone have any suggestions on how to parse the string correctly to avoid truncating in the middle of an HTML tag? Thanks for the help! :-)
  5. Very useful links. I've already researched, found most of what I would be dealing with, but it's the code that's a little above my head. What I'm trying to do is use their search function to get results. Then I will echo out of PHP in a custom XML format that does not put everything in the design template. For someone of my skill level, it's quite a difficult task :-)
  6. I posted this in the 3rd Party script thread, but it didn't seem to be generating any views. I'm working with MediaWiki right now, but it's a little out of my league. My issue is that I would like to use the search already built in to MediaWiki, but that I would to echo the results myself. If anyone is familiar with MediaWiki search classes, it would be awesome if you could pass me a few pointers (that was a very bad pun).
  7. I've got a nice little wiki installed, and I have pumped in some of the major wiki dumps. They are quite huge, and I want to use some functionality MediaWiki already uses to search the data. My PHP/SQL skillz are not quite on that level, and MediaWiki is already doing what I need to do. I would like to use their search functionality to retrieve the data in the same way, but I would like it to not display results. I would like to take those results and echo them however I want. Is anyone familiar enough with MediaWiki that they can help? Thanks in advance!
  8. I'm working on a site that is successfully using a forced download for know MIME types. My problem is with the readfile() function.  Some of the these files are >5MB, and using readfile() forces PHP to read the file THEN put it in the to the buffer.  That's way too long of a wait, and way too much processing.  Is there a way to stream file directly in to the output buffer? Thanks for the help! /apollo168
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.