內容 |
|
|
|
|
Strange, I had to do that, too. That wasn't necessary on my local development instance.
|
|
|
I got it, but I'm having problems getting JForum to use it. Even after setting Arabic as the board default language it isn't used by JForum, and doesn't show up in my profile settings. Not sure what's going on.
In general I would say it's better to encode the language files using the \uWXYZ notation you see in Russian file, amongst others. While some files use accented characters (Portuguese, for example), those tend to cause problems.
|
|
|
It's hard to tell what's going on without having access to the properties file; if you email it to me I can take a look.
|
|
|
Only moderators can view stack trace.
Is the user you're working with not a moderator/admin? If so, try making it one (by adding the user to the Administration group), so that you can see the stack trace which might point to the problem.
|
|
|
|
|
|
|
|
|
What would be the purpose of that? The Maven war plugin can probably do that, so you might want to read up on that.
|
|
|
Don't copy that method to the ForumAction class, use it as is, like new AttachmentCommon(request, forumId).getAttachments(postId, forumId). The postId and forumId variables need to reflect the post that has the attachment you intend to show. request is available as an instance variable in the ForumAction class.
|
|
|
What do you mean by "what to add"? Why would you want to change that method? You would call it, not change it.
|
|
|
I'm not sure what you mean by "where to add" and "How to access" that method - I told you about a month ago which Java code is responsible for the home page; that's where you need to do that. You can also post the code you have changed -just the relevant parts- here if you're struggling with something in particular.
|
|
|
I won't respond to questions of "how to do this" unless I see evidence that you actually tried to understand what is going on, and how to make it work for you. There are some questions one might have when trying to use the AttachmentCommon.getAttachments method (not many, actually, since both its parameters, its result, and its operation, are all straightforward), but since you didn't ask any particular question, and I'm not willing to spoon-feed you everything, I can only suggest -once again- that you study the code, and once you've made some simple changes and didn't get those to work, come back here with specific questions about the changes you made.
|
|
|
Open-ended questions like "suggestion please" make it hard to help you. What code, exactly, have you changed yet, and what, exactly, is preventing you from progressing? I pointed you several times to the Java code and the template where changes will have to be made. You should have an understanding by now of how JForum accesses DB data internally, how it passes data to the web page template, and of the FreeMarker template language. If not, start by making simpler changes until you do. As I said, there really is no substitute for digging in and getting to know the code base.
|
|
|
Via Admin Control Panel -> Categories -> click on category and set accordingly
|
|
|
The Java method I mentioned before is responsible for pulling together all the data to be used for the home page. That's where you would need to add all information needed for the image. The AttachmentCommon.getAttachments method is how you would get the data for a given post_id.
The jforum_attach and jforum_attach_desc tables have all the data to get at the required attachment (especially the file name that becomes part of the URL) for a given post_id, in case you need to access it directly.
A good start might be to attach a picture with a post, noting its post_id, and adding code to the home page that displays the picture attached to that particular post.
|
|
|