Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
stag
New Member
New Member



Joined: Jan 12, 2004
Posts: 22

PostPosted: Thu Apr 29, 2004 11:32 am Reply with quote

Hi,

Can anyone help me with this silly issue, i want to limit the number of characters in $topic_title in the center forum block to 15, but don't have php knowledge to do that


Last edited by stag on Mon Sep 27, 2004 10:12 am; edited 1 time in total 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Apr 29, 2004 1:29 pm Reply with quote

This is just on the fly. After this line of code
Code:
$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi ); 

while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )
add this line
Code:
$topic_title = substr($topic_title,0,15);
 
View user's profile Send private message
stag







PostPosted: Thu Apr 29, 2004 1:51 pm Reply with quote

Sorry raven, its not working!

It is showing a blank center forum block. No errors are shown although
 
Raven







PostPosted: Thu Apr 29, 2004 2:49 pm Reply with quote

Sorry. Place that line of code after this
Code:
while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) ) 


{
 
stag







PostPosted: Mon May 17, 2004 4:47 pm Reply with quote

Hi raven, just another help required from your side.

Can you tell me how to make the above center forum block specific to only one category of the forums, i mean so that it shows last ten posts from only one category of forums in all the forums. Your help will be greatly appreciated.
 
stag







PostPosted: Thu Jul 01, 2004 2:06 am Reply with quote

Hi Raven,

Can you please tell me how to skip the displays from one particular forum in the above script. I want to hide the posts of a single forum (say forum id=1) in the output of the the centre block.

Your help will be appreciated (as always)
 
Raven







PostPosted: Thu Jul 01, 2004 4:58 am Reply with quote

Assuming this is your select statement[coe]$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi );[/code]change it to
Code:
$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics where forum_id != 1 ORDER BY topic_last_post_id DESC", $dbi );
 
neophite
Regular
Regular



Joined: Sep 13, 2003
Posts: 56
Location: Virginia

PostPosted: Thu Jul 01, 2004 10:36 am Reply with quote

I am having a problem with one of my websites showing the recent forum posts on the center block of my main page, I would like to be able to use fiapple recent forum posts block, but it only works on one site and on the other site it only shows the header and frame but NO posts (even your collapsing forums block doesn't show any entries, which worked before).

This is something that I have just decided to run on my websites, in the past couple of days. Each of the various recent forum blocks that I have tried that came with RAVEN's 7.0 distribution (with the exception of the one that currently is working) displays only the frame work and header without any post entries.

I currently am using one of the other forum post blocks in your 7.0 distribution, which works fine...but I rather like the fiapple display better.

What am I missing? I haven't made any changes to my websites.
[ Only registered users can see links on this board! Get registered or login! ] - fiapple forum post works fine! [ Only registered users can see links on this board! Get registered or login! ] - only one forum block displays entrys.

_________________
Warmest Regards,
Bob Miedema
 
View user's profile Send private message Visit poster's website
stag







PostPosted: Thu Jul 01, 2004 4:02 pm Reply with quote

Thanks raven, it worked like magic! It helped me getting rid of the headache i was getting for past one month in sorting this problem.

Another little request if you have time, can i use a similar hack to show the output of only one forum, say forum id = 1
 
stag







PostPosted: Thu Jul 01, 2004 4:08 pm Reply with quote

thanks, i sorted that out myself!

You are educating me well! Cool
 
stag







PostPosted: Thu Jul 01, 2004 4:17 pm Reply with quote

now another problem has risen, how to block the output of two forums in center block?
 
Raven







PostPosted: Thu Jul 01, 2004 5:48 pm Reply with quote

The same principle
Code:
$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics where forum_id NOT IN(1,5) ORDER BY topic_last_post_id DESC", $dbi );
Of course the 1 and 5 are only examples.
 
stag







PostPosted: Thu Jul 01, 2004 6:36 pm Reply with quote

please teach me some more,

what if i want to show the output of only two forums? can i use

Code:
where forum_id IN(1,5)
 
Raven







PostPosted: Thu Jul 01, 2004 6:45 pm Reply with quote

Yes my little weed-hopper Wink Image
 
stag







PostPosted: Mon Jul 19, 2004 6:38 pm Reply with quote

Hi Raven,

Sorry about my obsession with this center forum block, but can you please tell me how to convert this block into a module.

I have added the required code on top and bottom of this block and put it into module/forum/index.php but it is still showing a blank page in middle.
 
stag







PostPosted: Wed Sep 08, 2004 2:23 am Reply with quote

Hi Raven,

You have been great help in solving my queries above and teaching me some new aspects of php (anyways i am blank for any script including php)

I have been trying to limit the above center forum block so that it shows only the posts which has recieved n (say 10) number of replies. I have been trying for over a week now but with no success. I should admit here that i am still as ignorant as i ever was, so I came back once again to ask you for some more help. Please.

I realise that i am being a pest here, so i will make a contri to speed up ur donateometer.

Thanks
 
stag







PostPosted: Thu Sep 09, 2004 1:16 pm Reply with quote

any help sir?
 
Raven







PostPosted: Fri Sep 10, 2004 6:55 am Reply with quote

Can you post your code as it stands right now?
 
stag







PostPosted: Fri Sep 10, 2004 7:05 am Reply with quote

well, thanks raven


Last edited by stag on Mon Sep 27, 2004 10:11 am; edited 1 time in total 
stag







PostPosted: Fri Sep 10, 2004 7:08 am Reply with quote

I was trying that the only the popular topics i.e. the topics with "x" number of replies should be shown in this block.
 
stag







PostPosted: Mon Sep 13, 2004 8:27 am Reply with quote

Raven wrote:
Can you post your code as it stands right now?


I have tried again to hack the code this weekend, but no success Sad
 
stag







PostPosted: Wed Sep 15, 2004 11:47 am Reply with quote

Raven wrote:
Can you post your code as it stands right now?


please
 
Raven







PostPosted: Wed Sep 15, 2004 11:54 am Reply with quote

It's on my list but I haven't gotten there as of yet.
 
paradox_h2o
New Member
New Member



Joined: Oct 20, 2007
Posts: 8

PostPosted: Tue Oct 30, 2007 7:36 am Reply with quote

When people make Forum Posts where they copy & past from another source........the whole post shows in the preview.....but when the message finally posts....it only shows the first few sentences...then the rest is cut off........
this has happened to me on the previous versions of nuke also...and it also happens on the universal module.....
does anyone know what is causing this???? And odes anyone know how to fix it?
 
View user's profile Send private message
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Wed Apr 15, 2009 5:57 pm Reply with quote

Nevermind on the question I went ahead and did this:

Code:


        $title = stripslashes($title);
        $title2 = substr($title,0,37);


That way I can still use the first output...

edit: sorry i didnt notice this was originally 5 years old, can someone split this out for me...
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©