Jump to content

VAForum Beta 1.0


simpilot

Recommended Posts

  • Administrators

VAForum Beta 1.0

developed and tested using:

php 5.3.0

phpVMS ver 819

ie8

*This addon will not work with the 700 version or beta's less than version 785

A simple forum board system that is contained within your phpVMS install.

To Install:

1 - download attached package and unzip

2 - place the folders/files in your phpVMS install as they are structured in the package

3 - use the forum.sql file to create the new db tables using phpmyadmin or the like

4 - you are done!

The system makes the pilot with id #1 in the db the main forum admin and can not be changed unless you do it through the db. There are four levels of user for the board:

1 - User - has rights to post messages

2 - Moderator - User permissions plus the ability to edit topics and posts

3 - Admin - User & Moderator permissions plus rights to create new boards and set user permissions.

4 - Banned - Can see boards but no posting permissions.

To link to the forum index use ->

 <a href="<?php echo url('/Forum'); ?>">Forum</a>

Moderator editing links are located within the topics and posts

Admin board creation and user administration links are at the bottom of the forum index

EDIT - *Do not delete the sample board before creating another one or just edit the sample board to fit your needs. Will be updating the code to avoid this in the next version.

VAForum(lic).zip

Link to comment
Share on other sites

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Hey , thank you for uploading the beta, Small request . Cna you please add an editor such as WYSIWYG as it will really help. I checked and i added the editor but it is not submitting the info to the forum. Please if you can that will be awsome for your next release or if you can tell us how to do it

Link to comment
Share on other sites

I got one working so good, If you like to have an editor on your Forum then add this script at the top of the *Forum_new_post.tpl and forum_new_topic.tpl) this also works on any other file that contains html txt box.

Add this code at the top of the source

<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>

You can check the preview at my site http://www.flymapleair.com/index.php/Forum/

Link to comment
Share on other sites

  • Administrators

Hey , thank you for uploading the beta, Small request . Cna you please add an editor such as WYSIWYG as it will really help. I checked and i added the editor but it is not submitting the info to the forum. Please if you can that will be awsome for your next release or if you can tell us how to do it

Looks like you got it under control.

Link to comment
Share on other sites

  • Administrators

First, Thank you!

and Second haha, where in the DB do I change the admin ID? I need Pilot with ID of 2 to be the admin.

Go into the DB and find the table forum_moderators, the columns should be,

id, pilot_id, mod_level

1        1            2

change the pilot_id column to whichever pilot you would like in that first row.

If it is pilot #2 you would change it to

id, pilot_id, mod_level

1        2            2

Link to comment
Share on other sites

  • Administrators

Thanks, it worked.. only problem now is under User Administration.. the pilot with ID of 1 is still un-editable.

edit forum_mod_list.tpl

line 21

if ($moderator->pilotid == 1) {echo '&nbsp';}

Change the 1 to the pilot number that you want as the permanent admin.

Link to comment
Share on other sites

I like the idea of that editor, but from experience in the past running forums of various types, allowing HTML in a post is not the wisest of ideas. Be careful not to allow it to run any java scripts in a post as well. That could easily spell disaster for your website. 

Lets take MySpace for example. It is soooooo prone to viruses that I have all but stopped going there. RARELY will I add anything fancy to my profile at all from any websites out there. They have you insert html stuff and scripts, then next thing you know, your infecting everyone in town. At least maybe make it so that the admin has a choice of who to allow html use to and who not to. I hope I have not read to far into this and am just taking it out of context.  :-[

Obviously, that is just my opinion and you know what is said about opinions  ;) So with that, I will thank you for such an awesome addon. I am more than sure if you continue this even further, it will be one hell of a great forum for phpVMS use. So far on my test site it is Forum 1 Errors 0

Link to comment
Share on other sites

  • Administrators

TAV - you hit on the main reason that I did not include the editor in the release, it is one thing to use it in the news center when only a select few will have access to it, but another whole world when you install the editor in an open forum system that all your pilots have access to. My intent is to have a bbcode table in the database to use and try to escape many of the issues you have descirbed as well as dis-allow html in the posts.

Link to comment
Share on other sites

Ok I'm glad I did read the post right. I was not trying to act like a know it all. I am a admin on a forum that builds a CMS for phpBB and we have thousands of users and they all want html and that is the reason we gave them. It simply is insecure and not a wise idea.

I am glad to see that you are looking ahead at possible  security issues and addressing them before hand. Makes me want to use this on a live VA site more and more once it is done.

Thanks for doing a wonderful job. I feel compelled to customize it already, but I have not. It is as you gave it to me. I hate to modify it then come back and report an error. That would kind of make me look bad  saying something is broke that I modded. 

Speaking of mods, are you open to people coming up with mods to your Forum like they do on other forums?

Link to comment
Share on other sites

  • Administrators
Speaking of mods, are you open to people coming up with mods to your Forum like they do on other forums?

Of course! To me that is what the open source community is all about, helping one another and making projects better!  ;) Quite frankly I do not have much time for folks that constantly point out issues and problems yet offer no ideas of a solution.

Just remember that BETA means just that, a work in progress.

Link to comment
Share on other sites

Ok great! I have a few things I will play with and see if I can make them work out or not.

I will try as hard as I can to NOT modify any of the core at all but making simple tpl adjustments for now. I don't really want to mess with core until it is a RC version in the future.

And yeah, Beta is exactly what it says.  ;) I try arguing the beta topic with my girlfriend all the dam time on facebook when she is nagging about apps not working.  ;D

Link to comment
Share on other sites

  • Administrators

also if you replace some of the functions with small graphics, it would look a bit better :)

I would like to do that, on a number of addons I have done/am doing but photoshop I am not very good at, well, I do not even own a copy, I use Gimp and not very well.  ::) If anyone would like to help out and create some button images for the addon I would be glad to use them. I have searched around the net but have never found a set that I really wanted to use that were the same size etc.... 

Link to comment
Share on other sites

  • 2 weeks later...

I add a post in a topic, but then if I try to click on the topic, I get this:

Warning: Invalid argument supplied for foreach() in /home/content/g/o/s/gosox116/html/core/templates/forum_post_list.tpl on line 15

Here's the code where it is pointing to:

<?php

//by:simpilot

//www.simpilotgroup.com

?>

<style type="text/css">

    .row1 { background: #dddddd; }

    .row0 { background: #FFFFFF; }

</style>

<center>

    <?php

    echo '<br />';

    $this->show('forum_nav.tpl');

    $forums = ForumData::get_forum();

    $row = 1;

    foreach ($posts as $post) {

        echo '<table id="forumtable" width="100%" cellspacing="0" cellpadding="2" border="0px" rules="none" frame="box">';

        echo '<tr class="row'.$row.'">';

If you have and ideas, please let me know.

Thanks!!!

Link to comment
Share on other sites

  • Administrators

Check in the database and see if there is actually anything in the forum_posts table. I am guessing that the db table did not get created correctly or one of the files is corrupted. If the table is there with all 8 columns I would re-load all the files and reload the sql file into the db. Let me know how you make out.

Link to comment
Share on other sites

The database table is populated with the correct posts, but the error still occurs when trying to view the posts on the forum. Here is what phpmyadmin showed for the posts table:

id topic_id forum_id author_id update_id date_posted subject body

3 0 0 1 0 2010-01-10 19:32:53 RE: When creating a new topic, do not add a topic description. This board is for posting suggestions, ideas, and input to help out SouthwestVirtual. If you want to post general items aviation or not aviation related, please use the Pilot Chat board.

4 0 0 1 0 2010-01-10 19:35:03 RE: TESTER

5 1 2 1 0 2010-01-10 19:40:45 Posting Rules Please do not include a description in new topics. That's it!

6 0 0 1 0 2010-01-10 19:46:19 RE: asdfasfas

Once again, the issue on the site occurs here: http://swava.net/index.php/Forum/get_topic_posts?id=2&forum_id=2

Thanks!

Link to comment
Share on other sites

  • Administrators

It looks to me like you deleted something out of the db along the way...

The link is looking for id=2 and there is nothing in your db list with id #2

I would drop the whole table and reset it with the supplied sql file and try it.

Link to comment
Share on other sites

  • 3 weeks later...

I'm back on this again while working on my Dev site. Is it possible to move the css info that is in the tpl files to our style sheet? Well anything is possible if one can code. lol  I should say, will it jack anything up if I attempt this? And it is safe to say, I can drop the tpl files in my skin folder?

And I modified the forum topics list tpl file to show the avatar of the user who LAST posted in the thread and to show the avatar of the user who originally posted in the thread. It is pulling the generic no avatar guy instead of the real avatar that I have set in my profile.  Any clue why this would be happening?

I understand it is in beta, I am just simply working on a few mods/hacks for it so when you release it, I might be ahead of the game as far as addons and hacks go for your forum.

Link to comment
Share on other sites

  • Administrators

It should not mess anything up by moving the css styles fro the tpl pages into the main css file. Just make sure there are no duplicate tags as it will override each other.

Can you post a link to the avatar example or maybe the code snippet, I am not sure what it might be.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...