內容 |
|
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.
|
 |
|
That posts seems to be missing a "please" (and I'll continue to ignore the absence of any trace of a "thanks" in your posts).
I already pointed you to the home page template file, and the Java class and method that would definitely be involved - check my posts from 10/14 and 10/18. There is no substitute for understanding the code, so I suggest you start reading through it so you get a feeling for how JForum works internally.
|
 |
|
I don't understand what the connection of that statement to your previous question is. Again:
Also mention what you have looked at and/or have tried so far, and where you're stuck making progress.
|
 |
|
I'm not sure what you're asking; please be more elaborate. Also mention what you have looked at and/or have tried so far, and where you're stuck making progress.
|
 |
|