Jump to content
TNG Community
XerxX

New Mod: Forum for TNG - almost finished (Demo running)

Recommended Posts

XerxX

Hi all,

 

My users wanted a forum to discuss things instead of mailing eachother.

I couldn't find one to integrate into TNG that was easy to install, maintain and use and looked TNG.

And didn't need registration or log-in. (The users are already registred and logged-in...)

So I coded one myself.

 

It's been running for a while now, and I have now converted my "custom xerxx code" to a more "one code fits all".

Including a setup/edit forums panel (tough job that one!).

It seems to work okay...

 

Yes, here's the link to the demo version (DB will not update! Some small glitches occur because of that)

https://xerxx.se/forumDemo/indexDemo.php

Simply select the kind of user you want to be and click "Enter forum". This is not a log-in screen but initiating some cookies, differently for each role)

This is a bi-lingual collection of forums: The default language is Swedish, because my site is Swedish, but once inside you can select English by clicking the English (or German!) flag upper left.

(If you use the Search facility: Search for "Lorem" like "Lorem ipsum" to have some hits - it's almost all demo threads :D)

 

So: If it's running, why is there no mod? Because I need help with some things:

* How do I put the link into the Info-menu (preferred)?

Especially as I have some code also that looks for new posts since last log-in and puts a "N" to the Menu. (And - I wish - to the menu heading too)

I don't have DD menus at my site so I don't do DDs...

 

* Can someone code a drag-n-drop sort, like how to sort children in the Family Edit screen?

This would be wonderful for the Setup/edit screen. You will see how I solved it if you are an Administrator and go to the "Setup and Edit forum" forum.

I don't know anything about jQuery, that I guess it is.

 

* As I have only Swedish and English translations, there is of course a need for translations. A lot... See the attached file!

The forum initiation process allows for using two languages! One default and one extra.

I have a Swedish site but some American users so I use Swedish as the default forum language but if someone uses English (or German), the language will be English.

And some posts are written in two languages. The complete Help forum f.ex. Users may choose one or two languages.

 

* And testing!

If some dare-devil and experienced testers would volonteer, that would be greatly appreciated.

Useability, errors, potential errors, look-n-feel, English spelling and grammatic errors - anything goes.

 

Please add a post below if you want to help to make this mod come alive. Describe what you can do, so everybody knows, and PM me your e-mail and I'll contact you.

Thank you for your time and interest,

Erik

 

translation.txt

Share this post


Link to post
Share on other sites
Merv

Hi Erik,

Some initial questions around privacy...

  • What sort of privacy options does this forum mod have?
  • Can an anonymous person access the forums or do they need permission to do this?
  • How do they get this permission and how are they screened?

Share this post


Link to post
Share on other sites
XerxX

Hi Merv, Thanks for your interest.

The forum is only for logged-in users: $currentuser must be set to find the link in the menu or to access it directly.

Otherwise you are re-directed to the log-in page. (Try https://xerxx.se/forum/index.php - the live forum).

 

If a post contains a link to a page in your system, the normal TNG permissions are as usual when the page is opened.

 

I hope that explains what you want to know,

Erik

 

 

Share this post


Link to post
Share on other sites
XerxX

I had this question privately:

 

The demo is a collection of forums.

You can start with only one and add (or delete) forums later.

If you have only one forum, the start page (index) is not displayed; the forum opens w/ the list of threads.

/Erik

Share this post


Link to post
Share on other sites
Ken Roy
12 hours ago, XerxX said:

So: If it's running, why is there no mod? Because I need help with some things:

* How do I put the link into the Info-menu (preferred)?

Especially as I have some code also that looks for new posts since last log-in and puts a "N" to the Menu. (And - I wish - to the menu heading too)

I don't have DD menus at my site so I don't do DDs...

How to add entries to the Info menu can be found in the Custom Menu Hook article

12 hours ago, XerxX said:

* Can someone code a drag-n-drop sort, like how to sort children in the Family Edit screen?

This would be wonderful for the Setup/edit screen. You will see how I solved it if you are an Administrator and go to the "Setup and Edit forum" forum.

The Sort Spouses and Sort Children are buttonson the Import Secondary Process tab, so  I would think you should be able to create something using those scripts

Share this post


Link to post
Share on other sites
XerxX

Part 1 done (?)

 

The customconfig.php file works good for adding the link itself. But it seems like $_SESSION[] vars are not initialized and DB calls can't be done via tng_query().

So I moved the whole code block (including the link definitions!) to just before the $infomenulinks are used in genlib.php, in function tng_getInfoMenu($title)

By renaming the $infomenulinks[ ][ ] to $infomenulinksforum[ ][ ] and do a separate call to $menu .= custom_links( $infomenulinksforum ); it actually seems to work:

The query goes through and so forums and threads are selected or not, depending on my $_SESSION['tngrole'], and so the News "N" is added.

I have to contact Darrin though, to ask him how "dangerous" this modification is! It feels a bit un-secure...

 

Tomorrow I'll have a look at the scripts you mentioned for the sorting. I have never used those tabs...

(I guess it's jQuery and I have only used it twice, both times copied code almost unchanged...)

 

Thanks Ken,

Erik

Share this post


Link to post
Share on other sites
XerxX

Hi Ken and all,

 

The above description didn't work when there were more menu selections made in customconfig.

I solved it however and has sent the code to Darrin for review.

 

I made a quick check of what you, Ken, meant to point me at for the sort...

You misunderstood I think: I was talking about the drag-n-drop sort in the Edit Family screen.

What I would like to have is similar to the attached image.

Can anyone out there code this for me?

I really don't know either jQuery nor d'n'd like that.

 

Enter the forums as an Administrator and go to the "Setup and Edit forums" (at the bottom) and you can see how I solved it.

And you will immediately understand why I want this.

 

Thanks in advance,

Erik

 

dndsort.jpg

Share this post


Link to post
Share on other sites
Ken Roy
30 minutes ago, XerxX said:

The above description didn't work when there were more menu selections made in customconfig.

I solved it however and has sent the code to Darrin for review.

Erik,

How did you code the customconfig.php entries?  Do I need to provide a better example in the wiki article.

Share this post


Link to post
Share on other sites
XerxX

No, Ken, you don't have to.

I followed the instructions and it worked perfectly. But customconfig.php is a "passive" page so session variables are not yet active and DB calls can't be done from there.

I had to move the whole thing to genlib.php and my description above worked, as long as there were no other menu selections defined in customconfig.php.

But because there _can_ be, I made a few changes and now it works.

And I hope it doesn't mess anything else up... That's what I've asked Darrin about.

/Erik

Share this post


Link to post
Share on other sites
XerxX

DelG asked me, in the "translator thread" if I've looked at other, ready-made, forums.

As I said in the OP I have. But none that I found was what I wanted:

* A no hazzle setup

* Easily integrated with TNG

* A TNG look and feel - almost most important!

* Easily maintained

* No registration process

* No log-in

* Easy to use - many of my users are elderly and not very used to computers

 

Actually; to write it for my site was quite easy. A few days (and late nights) of work and then me and two of my editors tested it on-line for a few nights.

The real work was to make my "custom xerxx code" into "one code fits all TNGs"...

For example; I have no "Setup and Edit" screen for my forum. That one alone was not easy to code.

 

Anyway, I hope you all will like it when I release it.

And I hope that some dare-devil testers will download the beta0 version, that I will post at the Wiki page when it's done.

Again; here's the link to the demo: https://xerxx.se/forumDemo/indexDemo.php

Select the kind of user you want to be (common, Editor or Administrator see different things) and enter the Forum.

 

Best regards,

Erik

Share this post


Link to post
Share on other sites
XerxX

Removed the contents myself. Not relevant, sorry.

/Erik

Edited by XerxX
Not relevant

Share this post


Link to post
Share on other sites
Avly

I am translating the "Forum for TNG" mod to Slovenian language, and I have two questions/problems.

1. Where can I translate the automated response email with subject "Watched thread is updated"? (It is not in the language file.)

2. In the automated email to administrator with subject "Post Reported!" the "Reason:" item is empty (although the reason for reporting was filled-in). It looks like this:

Thread: Test Thread
Thread ID: 14
Post: 0
Reported by: Test User
Reason:

I would appreciate if someone had an answer.

Andrej

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×