Jump to content

VAForum 2


Tom

Recommended Posts

Hi Tom I got off track this weekend doing school work and the old ladys Bday. I am going to get back on it tonight or tomorrow hopefully.

If you want, I can create a test account so you can see the forum I have so far. I have done some nipping and tucking and it is looking ok so far.

Ray

Link to comment
Share on other sites

  • 4 weeks later...

Ok so I have procrastinated and never worked on the mouse over yet. It is coming soon. However, I have fully skinned the forum and it is looking good.

One thing I did notice is that when you post in the forum, it takes you back to the topics page. That is a bit un accurate. It should take you back to the thread that you just posted in. Why? I think forum makers cater to lazy peoples needs. If it takes you back to your post and you review your post and find a mistake, that is one less mouse click then having to click and view the thread and then click again to edit. The internet if FULL of lazy people and this is one way that forum creators cater to their needs.

Nothing major, just something to look in to. ;)

Link to comment
Share on other sites

Oh I am not so sure nobody noticed yet. ;) Maybe they just have not been mentioned yet because someone knew you had hands full with other things on the forum lol.

Nah it's all good chief. I am just finding little bitty things here and there and taking note and dropping the notes in here every so often. I know I hate when I am working on something and someone gives me a list a mile long. It gets frustrating. I prefer to break things down in to smaller, simpler steps. That way it keeps one from getting in to burn out stage and happy because they see goals being met.

Great job so far. The forum is great and works a treat. ;)

Link to comment
Share on other sites

Oh and if not already, the forum is going to need pagination when viewing topics and posts. As you are well aware of, on a busy forum, these pages would get REAL long and put a strain on a server. ;)

I feel it is better to include it in the package rather then having web admins having to build it them selves and come and hassle you like I would for support to get it to work. :D Saves everyone a major headache in the end.

Link to comment
Share on other sites

  • 2 weeks later...

After I've finished my last exam I'll have a look further into the permissions.

As for the line breaks, when adding a message you should use

nl2br($message);

and then when displaying the message you can use

ForumData::br2nl($message)

Gotta kick this one back up again. I know you are doing the forum, but if you could help me out with the line break thing in airmail only if you get a minute or 5 to spare, I would really appreciate it. Well, I suppose I could go ask Simpilot in his thread eh? :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi Tom.

On the page get_topic To post or see if you can post in the forum, you have to scroll all the way down to the bottom of the page. I was wanting to move the post new topic and the ban check to the top of the forum right above the

Subject Started Posts Last post

I have tried and tried and keep getting errors. I think I am not using the else if or something right.

Can you point me in the right direction to accomplish this?

Many thanks.

Ray

Link to comment
Share on other sites

I've attached a replacement template to do this.

I'll be re-doing all the templates etc for the new version to hopefully make it easier to read and modify.

Edit: No, I haven't attached that file... apparently I'm not allowed to attach .tpl files...

Link to comment
Share on other sites

It's horribly messy, but for now this should work:

<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<?php $topics = ForumData::get_new_topics(5);
$row = 1;
foreach($topics as $topic){
$forum = ForumData::get_forum_name($topic->topic_forumid);
$forumcat = ForumData::get_cat_name($forum->forum_cat);
if($forumcat->cat_ispublic == 0){
echo ' ';
}
elseif($forumcat->cat_ispublic != 0){ 
echo '<tr class="row'.$row.'">';
echo '<td><a href="'.url('Forum/get_topic_posts?id='.$topic->id).'&forum_id='.$topic->topic_forumid.'">'.$topic->topic_title.'</a></td>';
echo '<td>'.date('d/m/Y - g:i a', strtotime($topic->topic_dateupdated)).'</td>';
$updatedby=PilotData::GetPilotData($topic->topic_updatedby);
echo '<td>'.PilotData::GetPilotCode($updatedby->code, $topic->topic_updatedby).'</td>';
echo '</tr>';
$row = 1 - $row;
}else{
echo '<tr><td colspan="3">No topics!</td></tr>';
}
}
?>
</tbody></table>

(Cut straight from the code on my own website so if the code is really bad feel free to tidy it up :P)

Link to comment
Share on other sites

You know what Tom? Between Simpilot coding this up and you tweaking the hell out of it, I think it might be the single best add on for phpVMS that could easily be part of the deafult install.

With that being said, I think the one thing that would push this forum right over the top, categories hierarchy. I know that would be a REAL pain in the ass so I am not holding my breath. Just something I was thinking of.

Even without it, this is still a bad ass add on no doubt in my mind. Thank you guys for all your hard work you and Simpilot have done. I know I say that a lot, but you guys do deserve it.

Link to comment
Share on other sites

It's horribly messy, but for now this should work:

<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<?php $topics = ForumData::get_new_topics(5);
$row = 1;
foreach($topics as $topic){
$forum = ForumData::get_forum_name($topic->topic_forumid);
$forumcat = ForumData::get_cat_name($forum->forum_cat);
if($forumcat->cat_ispublic == 0){
echo ' ';
}
elseif($forumcat->cat_ispublic != 0){ 
echo '<tr class="row'.$row.'">';
echo '<td><a href="'.url('Forum/get_topic_posts?id='.$topic->id).'&forum_id='.$topic->topic_forumid.'">'.$topic->topic_title.'</a></td>';
echo '<td>'.date('d/m/Y - g:i a', strtotime($topic->topic_dateupdated)).'</td>';
$updatedby=PilotData::GetPilotData($topic->topic_updatedby);
echo '<td>'.PilotData::GetPilotCode($updatedby->code, $topic->topic_updatedby).'</td>';
echo '</tr>';
$row = 1 - $row;
}else{
echo '<tr><td colspan="3">No topics!</td></tr>';
}
}
?>
</tbody></table>

(Cut straight from the code on my own website so if the code is really bad feel free to tidy it up :P)

You rock!!

Thankyou so much I think I might have a go at skinning it to match the frontpage but that is exactly what I wanted.

And I could not agree more with what TAV1702 said it is a great contribution to the phpvms install.

Just another thought not sure how much coding it will take but is it possible to add a button or something to add a picture to a post in the forum.

Thanks again

Scott

Link to comment
Share on other sites

Hi Scott. I have done that on my site. I am getting ready to dash out the door for a short bit. When I get back, if he don't beat me to it, I will show you how to do it....Gotta run!

Thanks Ray,

I was also wondering if it is possible to make it so that what is seen in the frontpage i.e with the latest forum posts. So that only registered users can see the recent posts in other words they have to be logged in to click the links and read the posts.

sorry for asking so many questions/requests but I am slowly trying to learn php and finding it more than a little difficult.

I should add that I have tried putting this code in but did not work.

<?php
}
else
{
// Show these items only if they are logged in
?>

Thanks again

Scott

Link to comment
Share on other sites

Thanks Ray,

I was also wondering if it is possible to make it so that what is seen in the frontpage i.e with the latest forum posts. So that only registered users can see the recent posts in other words they have to be logged in to click the links and read the posts.

sorry for asking so many questions/requests but I am slowly trying to learn php and finding it more than a little difficult.

I should add that I have tried putting this code in but did not work.

<?php
}
else
{
// Show these items only if they are logged in
?>

Thanks again

Scott

Replace my previous code with the following:

<?php if(Auth::LoggedIn()){?>
<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<? $topics = ForumData::get_new_topics(5);
$row = 1;
foreach($topics as $topic){
$forum = ForumData::get_forum_name($topic->topic_forumid);
$forumcat = ForumData::get_cat_name($forum->forum_cat);
if($forumcat->cat_ispublic == 0){
echo ' ';
}
elseif($forumcat->cat_ispublic != 0){ 
echo '<tr class="row'.$row.'">';
echo '<td><a href="'.url('Forum/get_topic_posts?id='.$topic->id).'&forum_id='.$topic->topic_forumid.'">'.$topic->topic_title.'</a></td>';
echo '<td>'.date('d/m/Y - g:i a', strtotime($topic->topic_dateupdated)).'</td>';
$updatedby=PilotData::GetPilotData($topic->topic_updatedby);
echo '<td>'.PilotData::GetPilotCode($updatedby->code, $topic->topic_updatedby).'</td>';
echo '</tr>';
$row = 1 - $row;
}else{
echo '<tr><td colspan="3">No topics!</td></tr>';
}
}
?>
</tbody></table>
<? } ?>

I'm really going to have to make that easier...

Link to comment
Share on other sites

Replace my previous code with the following:

<?php if(Auth::LoggedIn()){?>
<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<? $topics = ForumData::get_new_topics(5);
$row = 1;
foreach($topics as $topic){
$forum = ForumData::get_forum_name($topic->topic_forumid);
$forumcat = ForumData::get_cat_name($forum->forum_cat);
if($forumcat->cat_ispublic == 0){
echo ' ';
}
elseif($forumcat->cat_ispublic != 0){ 
echo '<tr class="row'.$row.'">';
echo '<td><a href="'.url('Forum/get_topic_posts?id='.$topic->id).'&forum_id='.$topic->topic_forumid.'">'.$topic->topic_title.'</a></td>';
echo '<td>'.date('d/m/Y - g:i a', strtotime($topic->topic_dateupdated)).'</td>';
$updatedby=PilotData::GetPilotData($topic->topic_updatedby);
echo '<td>'.PilotData::GetPilotCode($updatedby->code, $topic->topic_updatedby).'</td>';
echo '</tr>';
$row = 1 - $row;
}else{
echo '<tr><td colspan="3">No topics!</td></tr>';
}
}
?>
</tbody></table>
<? } ?>

I'm really going to have to make that easier...

That is great thanks very much

comparing the 2 bits of code it looks like the only difference is where the <?PHP tag starts and the extra bit of code New Code:-

<?php if(Auth::LoggedIn()){?>
<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<? $topics = ForumData::get_new_topics(5);

Old Code:-

<table cellspacing="0" cellpadding="2" border="0" width="100%"><thead><th>Topic</th><th>Updated</th><th>Posted by</th></thead><tbody>
<?php $topics = ForumData::get_new_topics(5);

Anyway thanks for the help.

Scott

Link to comment
Share on other sites

Yes, as well as the closing brace at the end:

<? } ?>

Those are the only changes, but I thought I'd make it easy...

Thankyou

Everyday is a school day.

Just another thought not sure how much coding it will take but is it possible to add a button or something to add a picture to a post in the forum.

Scott

Link to comment
Share on other sites

Hi Scott. Here is my way of adding an image to the forum that says New Post. I nabbed the New Post image from a phpBB2 install. I tried a phpBB3 but they are css and multi images. phpBB2.x is the best images to use for now.

<table width="97%" cellspacing="0" cellpadding="2" border="1px" rules="none" frame="box" align="center">
       <tr>
           <td align="left"><a href="<?php echo url('Forum/new_topic?forum_id='.$forum_id.''); ?>"><img src="<?php echo SITE_URL?>/images/forum/post.gif" alt="Post New Topic" title="Post New Topic"></a></td>
       </tr>
   </table>

Here is the image too just in case you need one.

Link to comment
Share on other sites

Ray, what did you mean earlier by category heirarchy? Like categories within categories or..?

I'll give you a few ideas I plan to include in the next forum:

- text editor (there's your button to include an image)

- possibly bit.ly & an image site API integration for images and URLs

- read and unread topics, with forum and topic icons to indicate this

- category visibility by pilot group

- move admin into admin panel (probably using a 'forum admin' group)

I think I have more but these will do for now :P

Link to comment
Share on other sites

Hi Scott. Here is my way of adding an image to the forum that says New Post. I nabbed the New Post image from a phpBB2 install. I tried a phpBB3 but they are css and multi images. phpBB2.x is the best images to use for now.

<table width="97%" cellspacing="0" cellpadding="2" border="1px" rules="none" frame="box" align="center">
       <tr>
           <td align="left"><a href="<?php echo url('Forum/new_topic?forum_id='.$forum_id.''); ?>"><img src="<?php echo SITE_URL?>/images/forum/post.gif" alt="Post New Topic" title="Post New Topic"></a></td>
       </tr>
   </table>

Here is the image too just in case you need one.

Hi Ray,

Sorry to be a pain I meant to add a Image like a jpeg or png file to a post.

But I will use the button in the Forums anyway.

Scott

Link to comment
Share on other sites

Ray, what did you mean earlier by category heirarchy? Like categories within categories or..?

I'll give you a few ideas I plan to include in the next forum:

- text editor (there's your button to include an image)

- possibly bit.ly & an image site API integration for images and URLs

- read and unread topics, with forum and topic icons to indicate this

- category visibility by pilot group

- move admin into admin panel (probably using a 'forum admin' group)

I think I have more but these will do for now :P

I cant wait too see the update

Scott

Link to comment
Share on other sites

Yeah you can do the same thing with your other file as well Scott. It is the same thing, The image I gave was the one I use in the get topics for posting a new post. Then I have another one that I use in the forum thread itself for posting a reply.

@Tom

Yeah I think you got me. Say for example I have 4 different divisions in my airline. North America, Aero, Etc, etc

Then in my forums I would add those categories, and then inside each one of those categories, I could add a category for each hub in that Division that way they have their own thread to mess around in.

Not exactly sure how easy that would be to do though. Might be like trying to reinvent the wheel.

Link to comment
Share on other sites

Yeah I think you got me. Say for example I have 4 different divisions in my airline. North America, Aero, Etc, etc

Then in my forums I would add those categories, and then inside each one of those categories, I could add a category for each hub in that Division that way they have their own thread to mess around in.

Not exactly sure how easy that would be to do though. Might be like trying to reinvent the wheel.

Essentially you could achieve this with a category for your divisions, with a board for each, then they can each have their own topics within there. Nested categories would be a little too advanced I think.

Link to comment
Share on other sites

Sorry Angel Air. Now after reading your post for the 3rd time, I finally got the blonde out of my hair and caught on to what you were saying.

Can you not use BBCode in your posts? We do on my site.

if that is the way I can do it then I will any pointers on how to implement the BBcode into the forum?

Thanks scott

Link to comment
Share on other sites

if that is the way I can do it then I will any pointers on how to implement the BBcode into the forum?

Thanks scott

BBCodes already in use:

[b][/b], [u][/u], [i][/i], [p][/p], [img][/img], [url][/url], [list][/list], [*][/*]

Bold, underline, italic, paragraph, image, link, list and list item respectively.

So for an image, you would use:

[img=http://www.link.com/to/file.jpg]

Which reminds me of something else I want to do: better BBcode processing and custom codes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...