vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   PluhNews 1.5 (https://vborg.vbsupport.ru/showthread.php?t=21875)

amykhar 12-01-2001 05:17 PM

I did quite a bit of editing on this to get it to work with more than one inclusion of PluhNews.php on the same page. However, it's finally working here:

http://www.easilyaddictive.com

This is really a powerful hack with a lot of possibilities.

Amy

DarkReaper 12-01-2001 05:32 PM

What'd you do? And would you be willing to release the modifications?

amykhar 12-01-2001 05:47 PM

I removed the require global.php and admin/config.php from the script.

Then, I modified the queries to use VBulletin functions.

I added the ability to put a <pagebreak> tag in the article so that it will break where you want it to.

My version also uses search engine friendly URLs, but I removed that from this one for you guys.

I have included pretty close to my version. (minus the url changes). To use it, require global.php and admin/config.php in the CALLING script.

Make a copy of this script and a copy of the config script for each instance that you want to include on your page. Edit the news script to point to the proper config script.

Amy

TheUnforgiven 12-12-2001 07:55 PM

simple not if you don't want to escape all your " just delete the echo line and do this
?>
Your stuff here <?= $somevvar?>
<?
thats what i did

Kayn 12-13-2001 04:54 PM

I just got back to this board, oh man, didn't know my hack was growing so much. :)

Hey Amy, could you send me your modifications? I've been really busy with my projects that I haven't had time to really work on PluhNews.

Plus, any other modifications that people have made that improved PluhNews, please send 'em

kayn@pluh.com

Thanks!

amykhar 12-13-2001 05:03 PM

It's in the mail. :)

Amy

Xube 12-13-2001 08:56 PM

Ok, here's my question. This pluhnews program seems to list the most recent THREADs created in a forum. I was hoping to get it to list whatever the most recent thread TOPIC postings are. What I mean is, I'd like to have it load the 5 threads that have the 5 most recent posts on my board.

In my General/Anything goes forum, I have it set so that whatever the most recent topics are.. that they float to the top of the forum (which is what I think most people are doing with their vB boards). I'd like my pluhnews to grab those most recent 5 threads and show them (not the most recent 5 newly created threads regardless of when the last post was on that thread as it pluhnews now does).

Can this be done? I'm guessing that maybe all that I need to do is change some variables in my Pluhconfig.php file? Can anyone help me with some advice on this? Thanks. :)

Xube 12-13-2001 09:08 PM

My other question is about using the posts that this program pulls as Highlights to drive more traffic to my board as opposed to having this program show the entire post. What I'm trying to get is the same effect like over on the Yahoo clubs boards if anyone is familiar with the way those work. What they have over there is when you visit a club, the most recent 5 messsges show with: the Headline of the message, the name of the poster, the Date of the posting, (and here's the tricky(?) part....), the first sentence or so of the text of the post (not the entire post).

Check out this club on Yahoo to see what I'm talking about

http://clubs.yahoo.com/clubs/thelastline

See how this welcome page over at this Yahoo club shows a "highlight" of the 5 most recent messages?

Is there any way this can this be done with this PluhNews program?
First off ... the PluhNews would have to get the 5 most recent thread posts based on date (not just get the 5 most recently created threads as it does now).
Secondly, is there a way to have this program only show the first sentence or so of the text in the post?

Kayn 12-14-2001 02:51 PM

Yeah, all of that stuff is possible. :)

All it would really be is a few more queries and some string manipulation.

I'm taking notes and will work on it for the next version of PluhNews. :)

yulee 12-14-2001 11:30 PM

Hello there!

I need a bit help :)

I'm going to install my vbulletin forum in a different subdomain than where I'm going to show the news. Could you help me to have it? I hope it could be done, but sure I'm waiting your replys because I don't want to miss my license.

My idea is publishing news in http://www.mydomain.com/index.php and have the forum in http://forum.mydomain.com. So I'm going to put the last url in my license.

Any ideas how could I include the files?

Thank you very very much. You are a very helpful people!! :)

amykhar 12-15-2001 01:54 AM

It's not tough. Just make sure to get the full path to your Pluhconfig.php file, and then in your global.php, edit the requires to contain the full path as well.

Instead of include "PluhConfig.php" you would have include "/home/username/dirctory/PluhConfig.php"; I am doing it across 3 domains, and it works like a charm.

Amy

Goldfinger 12-15-2001 04:46 AM

Quote:

Originally posted by Xube
(and here's the tricky(?) part....), the first sentence or so of the text of the post (not the entire post).


That isnt that hard to do.. :).

Modification email sent :)

yulee 12-15-2001 09:29 AM

Quote:

Originally posted by amykhar
It's not tough. Just make sure to get the full path to your Pluhconfig.php file, and then in your global.php, edit the requires to contain the full path as well.

Instead of include "PluhConfig.php" you would have include "/home/username/dirctory/PluhConfig.php"; I am doing it across 3 domains, and it works like a charm.

Amy

Thank you very much Amy, I need to be sure before filling the license. I'm really excited with vbulletin!

Sean 12-15-2001 09:52 PM

Ok, I am trying this script out. Very nice. I have my forums on a seperate sub-domain (I want the news on electron-designs.com, but my forums are on forums.electron-designs.com). I got the news working, but now my problem is getting the parsing to work. When smilies are parsed, it tries to find the images on that domain. Is there a way I can get it to look for them under the sub-domain? (Changing the URL to the images won't affect it, because the URL vB requires is a relative path..)

Thanks.

amykhar 12-16-2001 03:27 PM

You'll have to do what I did. Go to your smilies and make them reflect the full url.

Amy

sianews 12-18-2001 04:33 PM

While were requesting things :)

I run a news site and post news in a news program I run and in my forum. Would there be anyway to.

1. Include a checkbox on the new thread page that says "Add this thread to front page"? Otherwise that particular thread isn't included.

sianews 12-18-2001 04:50 PM

I finally got the script running and have an even better suggestion.

The way my news is set up now, the headline link goes to the acutal news source. Would there be anyway to have a "URL" field placed under the title field on the new post thread where the user would put the URL to the source? Then have Pluh use that, rather then the link to the post, for the headline?

KuraFire 12-18-2001 06:26 PM

Quote:

Originally posted by amykhar
It's not tough. Just make sure to get the full path to your Pluhconfig.php file, and then in your global.php, edit the requires to contain the full path as well.

Instead of include "PluhConfig.php" you would have include "/home/username/dirctory/PluhConfig.php"; I am doing it across 3 domains, and it works like a charm.

Let me get this straight (haven't had the time to read the entire thread) - if I want to include the news script and the headline script on other domains I have to put the full URL's to everything in my forum's global.php and the Pluhconfig.php and that's it? Not in any other script(s) or forum files?

Sean 12-18-2001 09:21 PM

No, not URL's, your ROOT PATH

eg: /usr/sites/yourname.com/forums/public_html/

You need the FULL PATH It is relative right now. :)

KuraFire 12-18-2001 10:10 PM

Aww crap, it's gonna be hell setting up my network of sites then, cos I'm building them on my own computer, Win2K with Apache+PHP+MySQL installed, but it'll all be different on my webhost! :(

Crud..

So in Win2K, should I use directory paths then? I.e. g:\program files\apache\apache group\htdocs\board ?

Sean 12-18-2001 10:22 PM

Same here, I wanted to get it running on ym computer, you could make two different globals, and just rename them when you upload...

That path, I am not sure of, because you may need c:\ (or whatever your drive is) in there.

Try both..

GL

yulee 12-20-2001 05:07 PM

Quote:

Originally posted by amykhar
It's not tough. Just make sure to get the full path to your Pluhconfig.php file, and then in your global.php, edit the requires to contain the full path as well.

Instead of include "PluhConfig.php" you would have include "/home/username/dirctory/PluhConfig.php"; I am doing it across 3 domains, and it works like a charm.

Amy

Sorry, could you point me where in global.php? I only changed in Pluhconfig.php and sure it doesn't runs properly. The coments links are using a wrong url.

Thank you!

yulee 12-20-2001 05:25 PM

And now a little help translating the news. I can manage it all, changing some variabkes and template, but I have a little problem with the date.

Could you help me on translate it into another language? I can have another format but only in english. I need them in Spanish, so any help with that please?

Really new in PHP at this time :(

Thank you!

Sean 12-20-2001 07:19 PM

Yes, just do a search for ./ or ../ I don't remember which. Then ust replace it with your path.

Good luck. :)

yulee 12-21-2001 10:45 PM

Thank you very much Sean. It's done!

Now I have my problem with date. Any idea to have date in another language. I know in PHP you can get the server time and get into the language you want, so it should not be very difficult. I tryed to do a simple replacement but it doesn't runs :(

I'd ike to have all my forum dates in another language, so could you point me where in the PHP files of VBulletin is managed the date?

Thank you very much.

Sean 12-22-2001 01:17 PM

Good, glad I could help.

I am trying the same thing, with a header problem, which I will soon fix.

The date it managed by PHP itself. That format is what PHP changes the UNIX time into. You'd probably have to look in the php.ini file.

Good Luck. :)

KuraFire 12-22-2001 05:06 PM

You can convert time and dates in PHP easily.
Just read up on how to use the date function (php.net/date or so) and you should be able to get it exactly the way you want to.

SystemLogic 12-24-2001 02:37 AM

Is there any way to setup the date per day....like these two sites for example:

www.techimo.com
www.hardware-one.com

I think that would prove to be very useful for many of the sites using this.

sianews 12-26-2001 04:43 PM

When going to the Headlines page, it works great. I included it on my front page and got some errors. I fixed the errors and nothing shows up. I know it's included because I got the errors, and I know its working because the headlines page works. Also, everything in my HTML after the <include> tage is not there :(. What could be wrong?

sianews 12-27-2001 01:26 AM

I included the URL rather than the path and it worked.

Any plans for categories in the near future? I have close to 30 forums and there's not a chance I'm installing this 30 times.

sianews 12-27-2001 02:38 PM

Quote:

Originally posted by usbnuts

I think you just have to change one line to grab any thread titles forum catergoies you want.

// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = "1" AND forumid = "2" AND forumid = "3" ORDER BY dateline DESC LIMIT $newsitems";

That's not working for me either. I'm getting no news displayed, but the "search for news" and "view all news" as well as the footer are all displayed.

If a delete both AND statements, the code works fine. Any way around this?

Brian Cruz 12-27-2001 06:35 PM

I have a question...

Whenever I need to close my board, my main page (which displays headlines) becomes a broken mess, with the "forum closed" message appearing somewhere in the middle. Is there a way to make it display something like "Headlines are temporarily unavailable" whenever the board is closed?

Sean 12-28-2001 01:29 AM

Sorry, can't help there, anyone else? :\

God, this script ROCKS! It is SOOO Easy to modify!!! http://g-designs.electron-designs.com/

I made that site for someone I host, that main page, and all the member's pages are news loaded off the boards. That is all inside a huge template. I also made the script say "Last Comment By: N/A" when there were no comments...AND I made it so if there is no news, it says so... :D I am so proud!!!! Now I just need to figure out where I will put the headlines... :)

If anyone wants my code, just ask. :D

sianews 12-28-2001 01:42 AM

I agree, the script is great - but someone must make a category addon :(.

Sean 12-28-2001 01:47 AM

Yes, a Category addon would be awesome.

sianews 12-28-2001 07:25 PM

So, anyone want to try and help with this category add-on?

Sean 12-29-2001 12:16 PM

Jeez... Now I am getting an error... It's from the smily parse thing...:

Database error in vBulletin 2.2.1:

Invalid SQL: SELECT smilietext,smiliepath FROM smilie
mysql error:

mysql error number: 0

Date: Saturday 29th of December 2001 10:04:57 AM
Script: http://forums.electron-designs.com/
Referer:

The weird thing: It works 100% on MY computer, but once on my server, it gives me this error...What could it be?

-Sean

sianews 12-31-2001 11:46 AM

Doesn't anyone use this anymore?

If categories aren't possible, is there anyway to make the script draw headlines frommultiple forum?

Sean 12-31-2001 12:09 PM

Yeah. I did.

What I did:

I used isset($variable) in an if statement. Then, whatever that variable was, it loaded: conf_$variable. Hence, loading a different configuration file for a different name...

I only had about 4-5 forums to do that with..

sianews 12-31-2001 12:12 PM

Can you post the code here? I'm to new to PHP to figure it out :).


All times are GMT. The time now is 07:40 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
  • Page Generation 0.01934 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete