Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2000
Posts: 10
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 10
I am half looking for help and half trying to get everyones creative juices flowing. I was looking for a way to let visitors post comments like with KTalk, but have those comments interface with my UBB forums rather than using KTalk itself. Well, from the few steps I picked up about printing the news article and sending the news article to a friend, I was able to set up Newspro to post comments to a designated thread in UBB. The problem is this: I can only set it to create a new topic each time, rather than just add each additional comment as a reply to the original topic. But here is how it is done.
Take viewnews.cgi and viewnews.tmpl and copy them to a temporary folder. In that folder rename them to comment.cgi and comment.tmpl (names can be whatever you want, this was the simplest for me.) Open up comment.cgi and find the line near the top that says:
$VNTmpl = 'viewnews.tmpl';
and change that to say
$VNTmpl = 'comment.tmpl'; (or whatever you named your .tmpl file.
Now it gets a bit more complicated if you are a total novice with Newspro and UBB, but still bearable. If you know them both pretty well and are familiar with customizing, it's pretty simple.
To start, open up your UBB control panel and go to forums. Add a new forum, call it News Comments or whatever you like. Go do the details setting and make sure to change the permission for who can post to any user, including unregistered, the same for who can reply. (Unless you want to force people to register, in which case leave it as is.
After you have created the forum, go to your UBB in the browser and open the forum you created, then click your "Post new topic" button. When the page opens, view the source code and copy the entire thing (this will ensure that all your personal UBB modifications carry over).

Next, open up comment.tmpl and clear the entire file, then past your UBB source code. Change the tp whatever you like. You can make it <TextField: newssubject> if you want it to have the news subject at the title (ohhh...complicted huh) Find the line that says:

The size and maxlength may be different if you have changed them yourself. In that line of code, change

VALUE=""

to

VALUE=""

This will make the default subject of the message whatever the title of your post was. NOTE: You can change TYPE="TEXT" in the same line to TYPE="hidden" to prevent people from changing the subject.

If you know about forms and the Newspro commands for .tmpl files then you will be able to do a lot more customization, but none is necessary.

Now, upload the comment.cgi and comment.tmpl files to your newspro directory, the same directory your viewnews.cgi and viewnews.tmpl are, and change the permissions on comment.cgi to 755.

The last step is to go to open up ndisplay.pl and add

[Post Comment]

in your posting guidelines after the sub DoNewsHTML string. If you have never edited ndisplay.pl before, simply find the text under sub DoNewsHTML and you will see it is the code for your posts which you had entered in Newspro.cgi before. The file will tell you to modify a line near the top, changing to , and from then on you will need to modify the posting format though this file.

I tried to explain that as best I can, if you have problems I will try to offer what support I can. Remember, this will simply post a new topic each time, so if 40 people comment on the post, there will be 40 threads with the same topic in your UBB. Advanced programmers will probably be able to figure out how to make it so that the first post open a new thread and after that it checks for the existance of the thread already and changes the post to a reply rather than a new topic. I would be more than glad to work with anyone that thinks they can help who has a good knowledge of NewsPro code...I have none. The two possible solutions I saw where the one I mentioned, checking for the existance of the thread already and opening a reply page rather than a new topic page, or if there was a way to change the newspro.cgi code so that upon submission of a new news article it created the new thread right there, and you would change the comment page to contain the UBB reply code instead. If there was a way to have two FORM Actions occur from one submission that would take care of the problem right there. Any ideas?

Anyway, I hope this gets us on the right track to having a full comment integration to UBB, which is the best Forum system I have seen to date (for those that can afford the $170 for the registered version or know a LOT about hacking the freeware version [Why can't they be more like NewsPro and give it away! ^_^]) For info on Newspro, check out: http://amphibian.gagames.com/newspro

To see this early-stage modification in action, you can visit my site at: http://www.fantasyonline.net
and just click on the little head below a news post.

Hope someone is able to discover the secret to non-repeating threads, if not I'll still be working on it, and trying to answer any questions if they should arise. Hopefully I have been clear and not all that confusing...but let me know.

Silmaris http://www.fantasyonline.net

Sponsored Links
Entire Thread
Subject Posted By Posted
Hack for Newspro to add the comments to a UBB thread. Silmaris 05/17/2000 5:42 AM
Re: Hack for Newspro to add the comments to a UBB thread. Slick Chicken 05/17/2000 2:50 PM
Re: Hack for Newspro to add the comments to a UBB thread. The Team 05/18/2000 7:36 PM
Re: Hack for Newspro to add the comments to a UBB thread. Slick Chicken 05/18/2000 7:39 PM
Re: Hack for Newspro to add the comments to a UBB thread. The Team 05/18/2000 7:54 PM
Re: Hack for Newspro to add the comments to a UBB thread. Silmaris 05/18/2000 8:18 PM
Re: Hack for Newspro to add the comments to a UBB thread. Discreet 09/17/2000 7:46 PM
Re: Hack for Newspro to add the comments to a UBB thread. Discreet 10/03/2000 6:26 AM
Re: Hack for Newspro to add the comments to a UBB thread. Jigga-Master 10/09/2000 7:55 PM
Re: Hack for Newspro to add the comments to a UBB thread. Pezman 02/05/2001 6:52 AM
Re: Hack for Newspro to add the comments to a UBB thread. AllenAyres 02/05/2001 12:14 PM
Re: Hack for Newspro to add the comments to a UBB thread. NBAustin 02/06/2001 8:05 PM
Re: Hack for Newspro to add the comments to a UBB thread. NBAustin 02/06/2001 8:31 PM
Re: Hack for Newspro to add the comments to a UBB thread. Opaque 06/09/2002 2:34 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,574
Posts293,926
Members13,850
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)