Previous Thread
Next Thread
Print Thread
Rate Thread
#226155 10/10/2002 9:51 AM
Joined: Sep 2002
Posts: 8
Newbie
Newbie
Offline
Joined: Sep 2002
Posts: 8
I am reading through the code for UBBThreads trying to get a handle on what is happening where and why. I think I am getting a grasp on what I would need to do to implement the changes I want to make, but one particular line of code is puzzling me.

$dbh -> do_query($query);

Someone please tell me what the hell -> does ! I have searched high and low in my Wrox Beginning PHP4 book, as well as Zend manual and the PHP site. I see it in code returned from search results and am totally in the dark.

Thanks for your time.

Sponsored Links
lamf #226156 10/10/2002 10:31 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That's calling a function that's inside the dbh class.


<?
class someclass {

function somefunction() {


return "someresult";


}

}


$someclass= new someclass;
$thistext = $someclass -> somefunction();

echo $thistext;

?>





The above code should display "someresult" to the browser.






Edit Note: I changed "blah" to "someresult" as what is returned by the function "somefunction()" from inside the class "someclass".

Last edited by JustDave; 10/10/2002 12:16 PM.
sjsaunders #226157 10/10/2002 11:44 AM
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
The dbh class is defined in mysql.inc.php in case you want to look at it.

sjsaunders #226158 10/10/2002 12:38 PM
Joined: Sep 2002
Posts: 8
Newbie
Newbie
Offline
Joined: Sep 2002
Posts: 8
Ahhh...excellent! Makes alot of sense now . Thanks guys.

Joined: Sep 2002
Posts: 8
Newbie
Newbie
Offline
Joined: Sep 2002
Posts: 8
Ok, this made good sense and answered most of my looming questions....but one I cannot seem to figure out.

I see that the function do_markup() is part of the html class in ubb.inc.php. From trying to follow the program logic (and yes, it was nearly impossible without your earlier answer) I see that showflat.php and showthreaded.php are what generate the page to view any specific message(s), correct?

My question is this, I cannot seem to determine at what point do_markup which decides wether to 'allowimages' or not interepret the tags. When does this function get called? The only place I haven't looked yet is in the template file....maybe I should look there also. *sigh*

Sponsored Links
lamf #226160 10/10/2002 1:25 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Markup is changed to html when the post is being added to the database (addpost.php) provided the board the post is being assigned to allows markup.

This keeps showflat/showthreaded from having to convert the markup each time a post is displayed.

Joined: Sep 2002
Posts: 8
Newbie
Newbie
Offline
Joined: Sep 2002
Posts: 8
Well if that just don't friggin beat all ! Well, at least I know now. Appreciate your help.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks.

I learned something too.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)