![]() |
Can anyone see any problems with this code?
This code grabs the most recent post, author blah blah... I keep getting an error message that states:
Quote:
Code:
<?php |
put in global $DB_site; and see how that goes.
|
You need your global.php mate.
Change PHP Code:
PHP Code:
|
I've installed many hacks but for some reason, I can't get the path right for my global.php.. I have set it to /homepages/24/d116946458/htdocs/vb/global.php , but it now says
Quote:
|
Something else is assuming you are in the forums folder.
try ... chdir("/homepages/24/d116946458/htdocs/vb"); Before your call to include global. |
Heh :).
Are you coding a vBa cmps module? Or is this a normal script, and you're using a cmps module as a guide? |
Yeah, this is for a vBadvanced module at the top of my site. I made sure that I specified the forum to pull the objects from
Quote:
|
Try filling in 2 instead of the variable, see what it gives.
|
NOPPID- you're the man. I put the chdir... before it, and now I don't receive an error message. One problem though, and I suspect it is with my template, but if you go to the homepage, well, you can see its kind of messed up.
My template goes something like this... Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> |
Quote:
|
So, I don't need the <iframe> part in there at all and have the module call adv_portal_features (the template)?
BTW: I opened the forum back up so you can see the problem occurring. Everything is cool now. Thanks for all of your help |
Yes, add your PHP file to your modules list, and it should work.
Have you pu the layout of your module in your PHP file? If so, place it in a template. |
My only problem is that I am not sure how to format the template. The module is activated and it includes features.php, but I am unsure what to put in the template to display the information that the php script retrieves. Anyone have any ideas?
|
Post the script you coded here, else we can't help you.
|
It's the same one as above. Here it is
Code:
<?php |
What info do you want displayed?
|
hey i got it all sorted out finally. Thanks for all the help, especially from Deaths and noppid.
actually, lol, i have one other thing... I got the title pulled, but how do i make it a link to that post? and the cut off is at 150 words, but how do i create a link that says "read more", for my users to read the rest of the posts? |
Link to thread:
Code:
<a href="showthread.php?t=$box_forumid_1thread[threadid]">$box_forumid_1thread[title]</a> To limit the message to a certain amount of chars (in this case 250): PHP Code:
The PHP code must be added to the PHP file, BELOW the query, and BELOW the parsing of the bbcode in it (if you parse it), but ABOVE the calling for the template. That should work, if not, let me know. |
The link to the thread worked great. I'm not sure what you mean by the variable I use for my message, though..
|
Well, how do you display that text?
|
Do you mean the $box_forumid_1_first_post[pagetext]? I'm sorry, I'm in the process of learning PHP, but I'm not too far along.
|
Yes, that's it.
This should work: PHP Code:
|
I get this error:
Quote:
|
Ah, sorry, my bad.
Its supposed to be this: PHP Code:
PHP Code:
|
I tried both, but a "read more" doesn't show up. Check it out here. Should something be added to the template?
|
It should show up normally...
Try searching in your phrases for read_more, does that exist? |
GOT IT! I took out the previous code that limited the post length because it was conflicting with your code, which worked. Thanks so much man for all your help; before all of this I was going to pay someone to do this for me, so you saved me some money. Again, thanks for the time you've put into this, and thanks to others who contributed.
|
No problem mate.
If you need any other help, just PM me, or post a thread :) |
All times are GMT. The time now is 11:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|