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
marcirish

i have installed the Forum for TNG mod and created my first forum but it doesn't show up in the info menu.  Nor does it show up on the first page of template 16 even though I installed the mod to add it to template 16 index page.  What am I doing wrong?

Thanks.

 

Marc

Share this post


Link to post
Share on other sites
theKiwi
1 hour ago, marcirish said:

i have installed the Forum for TNG mod and created my first forum but it doesn't show up in the info menu.  Nor does it show up on the first page of template 16 even though I installed the mod to add it to template 16 index page.  What am I doing wrong?

A link to your site would be quite helpful

Roger

Share this post


Link to post
Share on other sites
marcirish

Yes, I will include in the future.  I figured out what I was doing wrong.  I didn't complete the setup process totally.  When I did (and published the forum) it showed up as available in the menu.

Thanks, though, for the reminder to include my website link.  in the future I will do so.

 

Marc

Share this post


Link to post
Share on other sites
marcirish

I am trying to install Forum for TNG. The mod installed okay. When I clicked on create tables, etc. the message I got was the following:

 

ttempting to create tables...   All tables created succesfully.
Attempting to add keys to tables...   All keys added succesfully.
Attempting to add autoincrements to tables...   All autoincrements added succesfully.
Attempting to create directories...   3 directories NOT created!

What do I do to fix this?  I can't move beyond this step.

 

Marc Irish

Share this post


Link to post
Share on other sites
XerxX

Hi Marc, what happened? Did you solve it?

/Erik

Share this post


Link to post
Share on other sites
marcirish

I put it on hold.  I will let you know when I try again.

 

Marc

 

Share this post


Link to post
Share on other sites
BeresfordMike

Following up Marcirish. 

Using version12.3
I too have tried to install Forum for TNG and have the same error
after clicking CREATE TABLES - 

Don't know if this information helps

 

line 439: %copyfile: forum_admin_job.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_admin_job.php
line 440: %copyfile: forum_anmelan.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_anmelan.php
line 441: %copyfile: forum_functions.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_functions.php
line 442: %copyfile: forum_index.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_index.php
line 443: %copyfile: forum_initForum.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_initForum.php
line 444: %copyfile: forum_makeFFile2.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_makeFFile2.php
line 445: %copyfile: forum_nyPost.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_nyPost.php
line 446: %copyfile: forum_nyTrad.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_nyTrad.php
line 447: %copyfile: forum_openForum.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_openForum.php
line 448: %copyfile: forum_openThread.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_openThread.php
line 449: %copyfile: forum_regedit_job.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_regedit_job.php
line 450: %copyfile: forum_soktext.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_soktext.php
line 451: %copyfile: forum_user_job.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_user_job.php
line 452: %copyfile: forum_setup.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_setup.php
line 453: %copyfile: forum_update4t5.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_update4t5.php
line 454: %copyfile: forum_setup_end.php  copied
Source: mods/forum_for_tng_mod_v11.0.1.6/forum_setup_end.ph

 

I only ask because lots of other files seem to suggest that they are installed.

 

Thanks

Mike

Share this post


Link to post
Share on other sites
XerxX

Hi,

What did you do? Upgrade/update of TNG and/or the mod? "Requires database update" is maybe misunderstood: It's only when you upgrade the mod from v10.1.3.4 to v11.0.1.6

I have tested mod v11.0.1.6 in TNG 12.3.0 w/o any hazzle.

/Erik

Share this post


Link to post
Share on other sites
BeresfordMike
7 hours ago, XerxX said:

Hi,

What did you do? Upgrade/update of TNG and/or the mod? "Requires database update" is maybe misunderstood: It's only when you upgrade the mod from v10.1.3.4 to v11.0.1.6

I have tested mod v11.0.1.6 in TNG 12.3.0 w/o any hazzle.

/Erik

Hi,

I had updated tried to install Forum_TNG on 12.2, without success.

I uninstalled the mod and deleted files, then updated to 12.3 after which installed Forum_TNG again.

It installed successfully and I then clicked CREATE TABLES.

That's when I got the error message above

 

Thanks for getting back to me.

Share this post


Link to post
Share on other sites
marcirish

I am attempting to install the Forum Mod again.  It allowed me to install the mod but when I hit the button to create tables, etc.  I get the following message:

 

Reports:

Attempting to create tables...   All tables created succesfully.
Attempting to add keys to tables...   All keys added succesfully.
Attempting to add autoincrements to tables...   All autoincrements added succesfully.
Attempting to create directories...   3 directories NOT created!

Share this post


Link to post
Share on other sites
XerxX

Hi guys,

I'm working on it but now it's soon 1AM so I have to sleep.

I'll continue tomorrow.

/Erik

Share this post


Link to post
Share on other sites
manofmull

Erik

Great to see you "back at work".

I installed your Forum mod 3 years back (where does the time go!?).

I thought it would be a great feature and site improvement. Sadly, it flopped, just wasn't used.

However your excellent Comments mod has proved to be a huge hit: some you win some you lose

Share this post


Link to post
Share on other sites
XerxX

Guys, I made some huge mistakes in the v6! I'm sorry about that and it shows that I'm not as fit for fight as I thought I'd be...

 

Anyway! A new version is uploaded to the Wiki:

https://tng.lythgoes.net/wiki/index.php?title=Forum_for_TNG

What you have to do is:

1) UNinstall v11.0.1.6 - only Uninstall, nothing more.

2) Check the customconfig.php and delete anything FORUM - if any.

3) You have three directories in your root, named

- forum_forumimg
- forum_img
- forum_languages

Delete them.

4) Install mod v 11.0.1.7

5) Click NEW INSTALL: "...create tables and more"

 

What I did to test this:

I installed v...6 and tried to create tables, no success: Tables and dirs created but no files copied. Uninstalled.

Installed v6 again and tried to create tables, no success: No dirs created - just like your final messages.

I think you did the same thing, right?

Then I did the 5 steps above and I got my forum.

Skärmavbild 2020-06-11 kl. 10.19.38.png

 

IF you don't want to do this yourself, I can do it for you if you PM me some username and password that may handle your mods and FTP..

 

Again: I'm totally sorry for this trouble that I caused you.

Erik

 

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

×