Version: , by Parker Clack
Developer Last Online: Nov 2013
Version: Unknown
Rating:
Released: 12-07-2001
Last Update: Never
Installs: 0
No support by the author.
I am wanting to call up the first post in a thread using the pagetext information in the post table. What would I use as a database query so that I get the pagetext associated with the first post in a thread?
I am wanting to use this in the forumdisplay.php file right before the call to the forumdisplaybit template.
I have tried using:
$post=$DB_site->query_first("SELECT pagetext FROM post WHERE threadid=$thread[threadid]");
$page=post[pagetext];
But I get varied results and it is is not the first post associated with the threadid.
Any ideas?
Thanks,
Parker
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Here is what I am trying to do and maybe you have some thoughts on this.
First off. The "title" tag can be used in a hyperlink so that it is a mouseover pop up box. So whatever you put in that title="your tex here" will get put in a little box when a person puts their mouse on the hyperlink.
The HMTL code would look like
< a href="http://www.yourplace.com" title="This is a test to show you what I am talking about" >Testing< /a >
and you just put that in the forumdisplaybit template as
At any rate I am wanting to put the $page output from the code used here but a lot of cases when a member posts a large font or they use some kind of extra html code or vB code that code shows up in the actual hyperlink itself. So instead of just the title of the thread the pagetext code shows up in the hyperlink text too. The majority of the time this works great. It is just those cases where the code is off. So, play around with this for a bit and see what you can come up with if you want.
Some members of mine have seen this used on another site, using a cold fusion type BB, and it works fine there.
I was noticing in the functions.php file using the bbcodeparse2 there are a bunch of replacement variables that are set up.
What I was thinking was you could write a bbcodeparse3 and have the script look at anything that had a [ ] or < > and replace it and everything that is in those brackets with "" instead.
This would make me think that it would strip out anything that is within any of those types of brackets, whether vB code or HTML.
All you would be left with is the text. Which is what you want anyway.
Any ideas on how to write that code for the bbcodeparse3?
and that worked to some degree but it still stripped out some of the hyperlink text itself and then butchered the actual text taking out the I's, Its, on, any, etc. but left other words alone. Very strange.
Any ideas on what I could use in the functions.php that would only put text and nothing between the [ ] and < >?