#1
I need to do something with the qouted text that is added to the reply, when you hit the Quote button..

Where is this text rendered? I've been looking in the YAF solution source for some time now, and I can't find it..

Thnx
Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
#2
Philthy wrote:

I need to do something with the qouted text that is added to the reply, when you hit the Quote button..

Where is this text rendered? I've been looking in the YAF solution source for some time now, and I can't find it..

Thnx





Maybe I should rephrase the question...

I want to add some text to the qouted text, eg. "
Philthy wrote:

I need to do something with the qouted text that is added to the reply, when you hit the Quote button..

Where is this text rendered? I've been looking in the YAF solution source for some time now, and I can't find it..

Thnx

"

This text is shown both in the "Post a reply" editor, and in the posts them selves..

So, I need to find the place where this text is rendered. I've spent quite a long time searching the YAF source, but with no luck.

Does anyone know where to look?

Thnx
Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
#3
Anyone??
Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
#4
If you just want the Quote handling, you can modify it in YAF.Classes.UI.YafBBCode.cs line 444:
UserPostedImage
If you want to know what goes on under the hood, (e.g. you want to create a new BBCode) you should take a look at various files. Some are:
FormatMsg.cs in YAF.Classes.UI
YafBBCodeEditor.cs in YAF/Classes/Editors
ReplaceRules.CS in YAF.Classes.UI/BBCode
If at first you don’t succeed, call it version 1.0
  • Kamyar
  • Rank: YAF Developer
  • Reputation:
    Exalted
    100%
  • Medals:
    Mod Developer Medal of Honor: Wrote a kick-ass Mod and contributed back to the community.Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.
  • Joined: 22/07/2009
  • Posts: 321
  • Thanks: 76 times
  • Was thanked: 58 time(s) in 47 post(s)
#5
Great thanks, I would never have found that without your help...

Now I just need to find where the qouted text is rendered in the text editor, when you hit the quote button to answer a post with quotes.

Meaning, in the text editor, the text you want to quote is appended to your reply message like -

"username" wrote:


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam accumsan lorem elementum turpis elementum
fermentum. Vivamus non lorem lacus. Nullam volutpat, tortor aliquet imperdiet feugiat, neque ipsum lacinia diam,
et gravida ligula erat eget lectus. Vivamus tellus mauris,


Man, I can't find my way around the source...

I searched all I could, but no one else seems to have had the same issues. Any help would be greatly appreciated...

Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
#6
it's in <YAfRoot>/editors/yafEditor/yafEditor.js. Line34
If at first you don’t succeed, call it version 1.0
  • Kamyar
  • Rank: YAF Developer
  • Reputation:
    Exalted
    100%
  • Medals:
    Mod Developer Medal of Honor: Wrote a kick-ass Mod and contributed back to the community.Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.
  • Joined: 22/07/2009
  • Posts: 321
  • Thanks: 76 times
  • Was thanked: 58 time(s) in 47 post(s)
#7
That .js file is for the editor settings right?

I need to find the .CS file that renderes the text you want to quote in the editor. I need to do some string manipulation on it...

The

"username" wrote:


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam accumsan lorem elementum turpis elementum
fermentum. Vivamus non lorem lacus. Nullam volutpat, tortor aliquet imperdiet feugiat, neque ipsum lacinia diam,
et gravida ligula erat eget lectus. Vivamus tellus mauris,



part...

Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
#8
rendering the text takes place in YAF.Classes.UI.YafBBCode.cs as I mentioned.
I'm a little confused about your request. I think you want something like this:UserPostedImage
If so, you should edit YafBBCode.cs line 460. That's how I added the custom text in the image.
Note that if you want to add the quoter's name in the formatted text, you have to pass the username data through all calls to CreateBBCodeModule method.

If at first you don’t succeed, call it version 1.0
  • Kamyar
  • Rank: YAF Developer
  • Reputation:
    Exalted
    100%
  • Medals:
    Mod Developer Medal of Honor: Wrote a kick-ass Mod and contributed back to the community.Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.
  • Joined: 22/07/2009
  • Posts: 321
  • Thanks: 76 times
  • Was thanked: 58 time(s) in 47 post(s)
#9
Ahh, I think I understand what you want now. Sorry, I should have read your posts more carefully.
When you press the Quote button, you are redirected to the post reply message with the quoted text already pasted in the text editor. to change the formatting, go to "<YAFRoot>/pages/postmessage.ascx" line 1777 method: "InitQuotedReply". There you will find the quoted text being formatted by calling some methods.
If at first you don’t succeed, call it version 1.0
  • Kamyar
  • Rank: YAF Developer
  • Reputation:
    Exalted
    100%
  • Medals:
    Mod Developer Medal of Honor: Wrote a kick-ass Mod and contributed back to the community.Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.
  • Joined: 22/07/2009
  • Posts: 321
  • Thanks: 76 times
  • Was thanked: 58 time(s) in 47 post(s)
#10
Thanks a lot man, that was exactly the spot I needed to find.

Again, I don't think I would have found it without your help...
Topic Starter
  • Philthy
  • Rank: YAF Camper
  • Reputation:
    Neutral
    59%
  • Joined: 20/05/2010
  • Posts: 15
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

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