Sorry for dummy question ,cuz i really wanna use this forum quickly
full features and function for minialism like me

Moderators: Gaia.
| Author | Post |
|---|---|
|
#1 Thu Apr 20, 2006 7:37 pm
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
for 5-10 subjects ?
Sorry for dummy question ,cuz i really wanna use this forum quickly full features and function for minialism like me ![]() |
|
#2 Fri Apr 21, 2006 10:37 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
|
You can connect to the database and perform a query to call the latest topics, and output them in a list or something similar.
<?php Edit your user, password and database name in the first statements. Eventually, use mysqli* functions if you are on PHP 5 and use MySQL >= 4.1. _______________ « Last edit by Dietrich on Mon Apr 24, 2006 6:34 am. » |
|
#3 Sat Apr 22, 2006 6:11 pm
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
Big thanks for quickly reply
but i still have a problemIs that can insert on html page ? or just only .php page so i should use iframe function to insert .php page that use your script ,isn't it ? Thank Mhoo |
|
#4 Sat Apr 22, 2006 8:11 pm
|
|
|
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
|
Of course, you need to put that in a .php page.
_______________ |
|
#5 Sun Apr 23, 2006 3:01 pm
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
Thanks
Dietrich a lot ![]() |
|
#6 Mon Apr 24, 2006 5:38 am
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
Fatal error: Call to undefined function: () in /usr/local/psa/home/vhosts/mhoomhoo.com/httpdocs/001.php on line 6
:< How can i do for next step? |
|
#7 Mon Apr 24, 2006 6:35 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
|
Oops, change
$r = $mysql_query("SELECT t.id, t.topic_title into $r = mysql_query("SELECT t.id, t.topic_title_______________ |
|
#8 Mon Apr 24, 2006 7:58 am
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/local/psa/home/vhosts/mhoomhoo.com/httpdocs/bb/001.php on line 12
sorry for same question but i don't have any experience from php .. thankz |
|
#9 Mon Apr 24, 2006 9:08 am
|
|
|
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
|
What does it say when you replace
ORDER BY p.post_time DESC LIMIT 10");with ORDER BY p.post_time DESC LIMIT 10") or die(mysql_error());? _______________ |
|
#10 Wed Apr 26, 2006 3:01 am
|
|
|
Member
Registered: Apr 2006
Posts: 6
|
that's all of content that show on the page that i request from forum :>
|
|
#11 Sun May 28, 2006 3:44 pm
|
|
|
Member
Registered: Mar 2005
Posts: 196
Location: Hungary
|
Can it be done that it displays like:
[ForumName]TopicTitle like [Support]Bug in smth _______________ Long Live Rock n' Roll! |
|
#12 Mon May 29, 2006 2:44 pm
|
|
Member
![]() Registered: May 2006
Posts: 29
|
Yes, it can. How about this? <?php |
|
#13 Mon May 29, 2006 4:04 pm
|
|
|
Member
Registered: Mar 2005
Posts: 196
Location: Hungary
|
Thanks!
![]() _______________ Long Live Rock n' Roll! |
|
#14 Mon May 29, 2006 4:10 pm
|
|
Member
![]() Registered: May 2006
Posts: 29
|
You're welcome.
|
|
#15 Fri May 18, 2007 2:16 pm
|
|
|
Member
Registered: Apr 2007
Posts: 13
|
I managed to install this and get it working, however, it is coded to work with the non-search engine friendly urls.
How would I need to change the code to work if I have friendly URLs enabled? Dawn |
|
#16 Fri May 18, 2007 3:09 pm
|
|
Moderator
![]() Registered: Oct 2005
Posts: 444
Location: canada
|
change the path.
TO
_______________ |
|
#17 Fri May 18, 2007 3:25 pm
|
|
|
Member
Registered: Apr 2007
Posts: 13
|
Fantastic! That worked like a charm!
Thanks, Gaia! Dawn BTW, this community has some of the most responsive and helpful folks I've come across on the Web. |
|
#18 Wed Oct 24, 2007 2:47 pm
|
|
|
Member
Registered: Oct 2007
Posts: 5
|
Good idea, this is exactly what I'm looking for, or close to that. I have a question - what if I want it to just display the latest 5 topic links from a particular forum? Thanks
![]() |
|
#19 Wed Oct 24, 2007 5:08 pm
|
|
Moderator
![]() Registered: Oct 2005
Posts: 444
Location: canada
|
This is the query that I use in uPortal. Just alter the variables with your own numbers:
SELECT t.id, t.topic_title, t.count_replies, p.content, p.post_time, p.poster_id, u.displayed_name FROM ".TABLE_PREFIX."topics t, ".TABLE_PREFIX."posts p, ".TABLE_PREFIX."members u WHERE t.forum_id = $fid AND t.status_sticky = 0 AND p.id = t.first_post_id AND u.id = p.poster_id ORDER BY p.post_time DESC LIMIT $limit $fid = the forum ID you want the items from. $limit = how many you want displayed. _______________ |
|
#20 Wed Oct 24, 2007 5:32 pm
|
|
|
Member
Registered: Oct 2007
Posts: 5
|
I'm getting errors, probably put it at the wrong place. Can you post the entire query?
|
|
#21 Thu Oct 25, 2007 1:59 am
|
|
Moderator
![]() Registered: Oct 2005
Posts: 444
Location: canada
|
This should work. Unfortunately I don't have the means right now to test it. Just post the errors you get and I might be able to point you in the right direction.
Also, don't forget to change the info/variables in the code to your own. _______________ |
|
#22 Thu Oct 25, 2007 7:12 am
|
|
|
Member
Registered: Oct 2007
Posts: 5
|
I'm getting this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result The weird thing is that I can get the very first code posted by the admin to work and show what I want (new threads from forum 6, which only has 1 topic at the moment) but it displays the link 6 times ![]() Also, do I have anything special to add to the php includes or will this suffice? <?php include("bac.php"); ?> « Last edit by Marikina on Thu Oct 25, 2007 7:14 am. » |
|
#23 Fri Oct 26, 2007 2:41 am
|
|
Moderator
![]() Registered: Oct 2005
Posts: 444
Location: canada
|
Sorry I didn't get back to you, I have been working like crazy. I will take a look at the coding tonight when I get home and will try to get something functional for you.
_______________ |
|
#24 Fri Oct 26, 2007 5:16 am
|
|
Moderator
![]() Registered: Oct 2005
Posts: 444
Location: canada
|
The following worked for me:
_______________ « Last edit by Gaia on Fri Oct 26, 2007 5:21 am. » |
|
#25 Fri Oct 26, 2007 5:53 am
|
|
|
Member
Registered: Oct 2007
Posts: 5
|
Thanks, it's working now!
![]() |
UseBB Community is powered by UseBB 1 Forum Software