PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

Sorry raven, its not working!

It is showing a blank center forum block. No errors are shown although
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 ) )

{
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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.
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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)
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 );
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
neophite
Regular
Regular


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

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

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 to the forums!
- fiapple forum post works fine!
Only registered users can see links on this board!
Get registered or login to the forums!
- only one forum block displays entrys.
View user's profile Send private message Visit poster's website
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

thanks, i sorted that out myself!

You are educating me well! Cool
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

now another problem has risen, how to block the output of two forums in center block?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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)
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

Yes my little weed-hopper Wink Image
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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.
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

any help sir?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

Can you post your code as it stands right now?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

well, thanks raven


Last edited by stag on Mon Sep 27, 2004 10:11 am; edited 1 time in total
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

I was trying that the only the popular topics i.e. the topics with "x" number of replies should be shown in this block.
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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
View user's profile Send private message
stag
New Member
New Member


Joined: Jan 12, 2004
Posts: 22

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

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


please
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

It's on my list but I haven't gotten there as of yet.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
paradox_h2o
New Member
New Member


Joined: Oct 20, 2007
Posts: 8

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

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: 268
Location: Missouri

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

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 Visit poster's website MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum