YAFLogo

Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago
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

Sponsor
Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago

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

Philthy wrote:

Maybe I should rephrase the question...

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

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

Philthy wrote:

"

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

Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago
Kamyar
  • Kamyar
  • 100% (Exalted)
  • YAF Developer
14 years ago
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
Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago
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 -

[quote="username"]

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...

Kamyar
  • Kamyar
  • 100% (Exalted)
  • YAF Developer
14 years ago
it's in /editors/yafEditor/yafEditor.js. Line34
If at first you don’t succeed, call it version 1.0
Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago
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

[quote="username"]

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...

Kamyar
  • Kamyar
  • 100% (Exalted)
  • YAF Developer
14 years ago
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
  • Kamyar
  • 100% (Exalted)
  • YAF Developer
14 years ago
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 "/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
Philthy
  • Philthy
  • 59% (Neutral)
  • YAF Camper Topic Starter
14 years ago
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...