Hello to everyone,

Is there anyway that my website users can start new
topic from my website itself (without going to discussion forum)?
Has somebody did something similar to my requirements?

Eagerly waiting for responses from community users!

I didn't get what you want exactly. You see, users should start a new topic in a specific forum. does this define what you're willing to do?
you have a link in you website labeled: "Start a new topic"
When a user clicks on the link, he will be redirected to the "post new topic" page with an additional option to specify the forum (For example from a dropdownlist) and when the user hits the post button, the new topic will be added to the specified forum.
If at first you don’t succeed, call it version 1.0
Hi Kamyar,

Yes, suppose I have a webpage in my website and at the end of that webpage
i want to give link "Discuss this webpage on our discussion forum".
This link should create a new topic with the title of the page from where user
has started new topic. Also I want to show the discussion below the webpage.
So, is it possible to customize YAF in this way?
Hope now my requirement is clear.
1- As I mentioned before, each topic is created in a forum. So when a user is trying to create a new topic you have to specify the forum in which that topic is created. You can create a forum ( let's say "Site Discussions" ) and put every new topic in that forum.
2- when the user clicks on your button, redirect him to "postmessage" page with the specified query strings. (if you have not enabled urlrewriting, the address should be something like: FORUM_ID
Which the forum id is the id of your "Site Discussions" forum.

2- If you want to show the discussion in your web page, Well that requires modifying the code behind. I think you should duplicate "posts.ascx" in YAF/pages and name it something like "SiteDiscussionsControl" and modify it thoroughly to be able to show the posts in you page. For example, you have to remove anonymous redirection or else anonymous users will not be able to view your topic. Also you have to assign values to your query strings in code-behind since posts.ascx is embedded in you web page. Surely you will have to do more than I explained.
If at first you don’t succeed, call it version 1.0
Hi Kamyar,

Thanks for all this information.
I will try this. Just have 1 more query.
Is it possible to pass title in the Query String?
e.g. something like this: {$ID}&title={$title}
If by title, you mean Topic Subject, you'd have to do it programmatically.
pass the query string to postmessage.ascx.
in postmessage.ascx.cs assign the title to "Subject" textbox. Something like this in page_load event:
if (this.Request.QueryString["title"] != string.Empty)
this.Subject.Text = Request.QueryString["title"]

If at first you don’t succeed, call it version 1.0

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved