1 andrewshapira Feb 08, 2007 18:57
3 andrewshapira Feb 09, 2007 02:18
Thanks. I can see the need for something like that even if I don't like some of the details.
Is there something that:
- does not cost money,
- does not require installation and maintenance to be compatible with future versions of b2evolution,
- has a less cluttered style of displaying code?
4 john Feb 09, 2007 02:35
Not that I know of but that's not to say it doesn't exist.
You could edit the plugin's CSS file to reduce the "clutter" as you call it.
ie, no alternating line colors, line numbers etc etc...
I'm sure the plugin authors from the AstonishMe team could help you with that.
5 edb Feb 09, 2007 19:37
If you want to really dumb it down, consider http://forums.b2evolution.net/viewtopic.php?t=5106 as something to work with. It's over a year and a half old now so it's probably obsolete, but back in the day it did what it was supposed to do. I've got this feeling though that working with the aforementioned plugin is a smarter idea.
6 stk Feb 10, 2007 00:43
Andrew Shapira,
Your comments are an arrow through the heart. :'(
1/ The AstonishMe "Display Code" plug-in doesn't cost money.
2/ It's a one-click install. We do all maintenance, not you.
3/ Less-cluttered? (*sniff - sniff* this one is the one that got me the most, as we quite literally spent HOURS trying to make it look nice) ... and still it retains the ability to be customized. (Make it look however you want by customizing the CSS!)
With your erroneous conclusions, I'm left shaking my head and wondering "Why did we bother?" And, I'm half temped to tell you, "Sod off!" :D
But ... I wonder, "What do you really want?"
Hmmm ... no install, no maintenance, free, uncluttered (what ever that means to you) right out of the box, is future-proof to anything that might come out in b2evolution (tomorrow or in the next 100 years) ... gee ... you don't want much do you?
Despite your pugnacious comments (or perhaps, in spite of them) I'm inclined to point you to [url=http://www.simplebits.com/cgi-bin/simplecode.pl]SimpleCode[/url]. It has every one of the attributes you indicated:
1) It's free.
2) There's no install and no maintenance required.
3) It's as "uncluttered" as it gets.
(Mind you ... it's also what drove us to make our plug-in, which is, IMO, a vast improvement on its output. But to each his own, eh?)
7 andrewshapira Feb 10, 2007 01:21
stk, if you read what I actually wrote, you will find that (a) I asked a question and said what I was looking for, and (b) I did not say that your product stinks - I just said that it was not for me. If you think everyone on the planet is going to like your product, you're bound to be disappointed. Also your web page gives the impression to at least one person that the product is not free. If it is free you might want to make that clearer. Probably you will read this as a complaint as well, but it is intended as feedback from someone who went to your web page.
Thanks for the pointer to Simple Code. It isn't what I'm looking for either. The problem with Simple Code is that I do not want to have to run each and every piece of code through it, and if I have 100 blog entries and later find something I want to change, I do not want to have to edit 100 blog entries to do it.
I figured that with so many b2evolution blogs in the world, there would be a standard way of displaying code in b2evolution blogs and I was wondering what it was. Maybe there isn't any such way, or, the closest thing is just to use pre HTML elements.
8 yabba Feb 10, 2007 01:30
Hey Andrew
I have to say that I feel Scotts pain here. We spent shedloads of hours making all that clutter work.
The fact is though, you can remove all that clutter with css and posting code is as simple as wrapping it in <amcode></amcode> tags.
The chances are that it'll be future proofed for a smidge as I have a tendency to post code on my own blog ;)
¥
9 stk Feb 10, 2007 02:02
Andrew,
LOL ... you mean what you "actually wrote" is somewhere other than this thread? No wonder I was confused!!
Why would I have an expectation that everyone like amcode? Don't be ridiculous.
I simply corrected your inaccurate (inferred) observations and lamented that what we worked so hard to make "nice" you perceived as "cluttered".
(Especially considering that you can modify the CSS to make it look however you want.)
The fact is: 3 possible solutions for displaying code have been presented: (1) amcode; (2) Ed's Hack and (3) SimpleCode. That none work for you, suggests that you don't really know what you want. AFAIK you've just been presented with the best options that exist on the forum.
There is no "standard way of displaying code in b2evo blogs", just as there's no standard way of displaying an image, or mp3 files.
I wish you luck finding something that meets your criteria. If you do, please come back and update this post. I'll be eager to see it. ;)
10 andrewshapira Feb 10, 2007 02:14
Yo Yabba.
Sorry that you are feeling pain from this. Feeling pain from user feedback is understandable, I guess, but unless you think my opinion is particularly important for some reason, I wouldn't know why this is such a big issue. People have different styles. I happen not to like numbered code and alternating colors and horizontal lines (except once in a while in certain situations). I am sure that one of the reasons I picked b2evolution is because the main page has such a clean, uncluttered look. That is just how I like things - so what?
I wonder if it wouldn't be a good idea to just use some tag like your <amcode> tag, except have the tag mean something like 'print this as is'. Maybe this could be done completely with style sheets. This would help with the special entity problems with ampersands, less than, greater than, etc., and would continue to work with future versions of b2evolution. Of course I have no idea how to go about doing that.
11 andrewshapira Feb 10, 2007 02:16
stk, here is what I wrote in this thread that seems to have gotten you so upset. Maybe you are reading way too much into things.
Thanks. I can see the need for something like that even if I don't like some of the details.
Is there something that:
- does not cost money,
- does not require installation and maintenance to be compatible with future versions of b2evolution,
- has a less cluttered style of displaying code?
12 john Feb 10, 2007 02:27
@ Andrew...
I wonder if it wouldn't be a good idea to just use some tag like your <amcode> tag, except have the tag mean something like 'print this as is'. Maybe this could be done completely with style sheets. This would help with the special entity problems with ampersands, less than, greater than, etc., and would continue to work with future versions of b2evolution. Of course I have no idea how to go about doing that.
It would take you or me about ONE minute to remove the styling from amcode.
You would have ..
NO line numbers
NO alternating row colours
NO borders etc etc etc
Now I might be a bit confused like the others , though less peeved.
In all your defence of your request you have yet to counter or deal with any of the help provided, let alone provide a link to either your siter or an example/link to the type of method you think is ideal.
13 andrewshapira Feb 10, 2007 02:36
The best way to get something that will continue to work is probably to depend on as few things as possible. Can you really guarantee that a hacked installation of amcode is going to continue to work in 5 years? Wouldn't it be simpler and less error prone to use something that does what I want instead of using where I remove 95% of the functionality to get it to do what I want? Wouldn't it be better to install something that is as simple as possible? Wouldn't CSS style sheets with something to recognize a tag like amcode (but a different tag) be simpler and less likely to break?
Asking for a method that I think is ideal is a little ridiculous given that I was asking for examples of how people do this in the first place, don't you think? How am I going to know what an ideal method is if I don't even know any methods to begin with (except pre)? It looks to me like people are being just plain petty because I happen to not like the style of amcode. I didn't even say that amcode is bad, I just said that I don't like it. Am I not even entitled to that opinion? Sheesh.
By the way I am not ignoring EdB's suggestion. I just do not understand it. And it looks sort of complicated.
14 john Feb 10, 2007 02:49
You surely are entitled to an opinion and I hope you come up with a great alternative and please let us know the result.
15 stk Feb 10, 2007 04:18
Andrew,
You are correct. It was that comment of yours to which I was replying, because the inferred list of features that amcode lacks - is incorrect. (Or, put another way, the answer to your question:andrew wrote:
Is there something that:
- does not cost money,
- does not require installation and maintenance to be compatible with future versions of b2evolution,
- has a less cluttered style of displaying code?
is (arguably) amcode.) ;)
Consider:
1/ Amcode is free.
2/ Amcode install is a one button push (easy) Maintenance is done by others, none on your part. Yabba has already indicated that'll it'll be kept current from version-to-version, b/c he uses it himself. (Not exactly install free or a future-proof guarantee, which is why I say "arguably").
3/ Amcode can be styled however you want. (That's not "hacking" ... it's styling).
PLUS, there are other benefits. bbCode still works inside amcode, code is code in the post (i.e., <'s aren't entered as <, which makes entering code a snap ... cut'n-paste), <amcode> is converted on-the-fly to xhtml-valid code, etc.
HACKING amcode? Why would you do that? 95% of functionality hacked out? That's silly. I wonder what your word processor is like. Did you hack it to only use 35% of its functionality. No. Removing line numbers, lines and alternating line colors isn't "removing functionality". Again - it's styling. I don't understand what functionality you feel you need to "hack" out.
BTW: CSS doesn't recognize <amcode> as a tag ... that's a made up tag name and would be invalid XHTML (unless the doctype was extended to include it, which would require a custom doctype and would be counter to the whole "web standards" initiative, but not the 'extensible' part). That tag is converted to standard XHTML tags and it are THOSE that are styled with the CSS.
You asked what the preferred method for displaying code? Perhaps the answer IS amcode! :D
You don't like the way amcode looks? Change it! That's the whole point of having a CSS file. ;)
I could care less if you use amcode or not.
You want to continue searching for something you think will work better - cool. (Good luck) ;)
You want to use PRE? Feel free. :D
Sure you're entitled to an opinion, but saying you don't like the way amcode looks (as an argument for not using it) doesn't carry much water, when it can be styled to look however you want. No hacking involved.
16 edb Feb 10, 2007 13:52
Hey stk. Thanks for the link to simplecode. That is exactly what I built my hack so long ago around.
AndrewShapiro you need to start paying attention. Nothing here costs money, no matter what impression you found when you visited a website. I've become convinced that you drill down on a particular detail in deference to all other information available. There is no single feature of b2evolution that is promised to last. In fact when you use it you accept that it is what it is and may not be suitable for your needs. I may in fact not even work! That's life online, so get used to it or watch teevee.
I was just looking at the oldest available version of b2evolution. NOTHING that happened then happens now. The only thing the development team tries to do is ensure that the product will upgrade across a few generations. At this point plugins are still somewhat new, and therefore some have not been able to carry forward. That's life!
Perspective: no one will die if you can't paste code into your blog.
stk is damned good at this here code stuff, though I think the styling aspects are more his thing than the mechanics of it all. ¥åßßå knows the insides of this code like nobody's business, though his sense of style is a bit ... different than most folk. Between them they came up with a great way to display code. My junior-grade hack pales in comparison. You've offered nothing we can see and you've found nothing acceptable from what you've been offered.
Stop being such an ass. Use the software. Link your blog here. Ask questions and thank people for their answers.
17 andrewshapira Feb 10, 2007 15:03
Thanks for the tip and name-calling. It really helps me with what I was trying to accomplish and makes me want to contribute to the b2evolution community. Thanks again.
At least get the person's name right when you call them an ass. It's "Shapira".
I do not know what you mean by "link your blog here". I enabled the thing in my Back Office that tells my blog to contact b2evolution whenever I write a new entry. I did that 3 or 4 days ago. The instructions say that this was supposed to make my blog be put in a queue where the b2evolution people would then decide whether to include my blog in the list of blogs that gets put on b2evolution's front page. I have no idea if it did anything.
18 stk Feb 10, 2007 17:39
Ed's meaning to add your blog to your profile here on the forums, which will put a little WWW button at the bottom. That way, when you have questions, we can come round to your site and see what the problems is, play with the CSS, see how the page looks, etc., etc. ;)
19 andrewshapira Feb 10, 2007 18:00
Ah, thanks. I just added a link to my blog. I guess in these forums, linking to one's blog is better than linking to one's home page.
20 personman Feb 10, 2007 23:04
Andrew,
First, don't mind Ed too much. He gets a bit grouchy when he thinks that people aren't listening, but overall he's very helpful and cheerful. At the risk of making this thread a broken record, I think amcode should work for you. Two reasons:
1. If you just do <pre> code </pre> you're going to have to encode every less than so it displays as code and is valid xhtml. That's a lot of < and a lot of time that you'll be spending. I wouldn't call that simple. AmCode takes care of all of that for you. You just paste in the code and it will display it.
2. Because it's styled with CSS, it's very customizable. If you think it's cluttered, just edit the css file to your taste. If you need help, I'm sure someone can point you in the right direction.
Cheers,
Danny
21 andrewshapira Feb 11, 2007 01:19
Thanks.
Maybe I should write my own code formatter. It could be really simple. All that is needed is some way to cause b2evolution to grab an area of the document, put it into a string, pass the string to a PHP method of my own choosing, and replace the string in the output with the output of the method.
For example, if the document contained this:
<div class="BlobCode">
public static void Main()
{
Console.WriteLine("1+1<3 goodbye");
}
</div>
Then b2evolution would grab the string "public static ... goodbye\");}" and pass it to my PhP method. This method could then process the string and output something like this:
<div class="BlobCode">
<code>
public static void Main()<br />
{<br />
Console.WriteLine("1+1<3 goodbye");<br />
}
</code>
</div>
B2evolution would then display this instead of the orignal text. It could be additionally customized in skins with CSS.
This would be almost identical to what <amcode> does now, except:
(a) because this system uses <div> instead of <amcode> to recognize the area to be processed, the original unprocessed document would be valid XHTML and would not contain foreign elements like <amcode> (maybe foreign elements like <amcode> are valid XHTML too, but with <div> this would be even clearer to us non-XHTML experts), and
(b) it would be simpler than AmCode because it would not bring in the code that AmCode uses for the parts of its operation that I would not use.
Is there a way to get b2evolution to do this?
22 personman Feb 11, 2007 05:04
<amcode> is replaced by the b2evolution renderer plugin event. View the source of a [url=http://b2evo.astonishme.co.uk/index.php/2007/02/09/astonishme_digg_plugin?more=1&page=3]page that's actually using it[/url] and you'll see that what's outputted is more like this: <div class="pre short">
I think that if you would take some time to understand the plugin system and how this one works you would see that it does just what you need. If you think it's simpler to build your own from scratch, then go for it. Here's the manual page on creating a plugin:
23 andrewshapira Feb 11, 2007 05:27
I know that <amcode> is replaced. I was asking for help about whether there was a way to replace <div class="BlobCode">. I explained why I wanted to do this instead of something like <amcode> or <blobcode>.
24 personman Feb 11, 2007 14:46
Yes, there is a way. [url=http://doc.b2evolution.net/v-1-8/plugins/Plugin.html#methodRenderItemAsHtml]Here's the plugin event[/url] that you'll want to use.
25 andrewshapira Feb 11, 2007 15:36
Thanks! Can you point me to any docs which describe the mechanism by which a <div class="xx"> element leads to
RenderItemAsHtml(array &$params )
being called?
26 yabba Feb 11, 2007 15:45
EdB wrote:
though his sense of style is a bit ... different than most folk.
:p
¥
27 andrewshapira Feb 11, 2007 15:56
What are you talking about, Yabba?
28 yabba Feb 11, 2007 15:58
Lack of style apparently :|
¥
29 edb Feb 11, 2007 16:01
Why are you guys feeding a troll? First he has no blog then he installed it 5 days ago. Then he wants to display code but doesn't want to pay for a free plugin that'll do that. Now 'someone who wants to display code in his blog' is asking how html triggers a plugin.
Feeding trolls doesn't make them not be trolls.
30 andrewshapira Feb 11, 2007 16:06
Let's see. Every blog I've ever seen with code in it displays code using a simple style without line numbers and without horizontal highlighed rows every other row (something that used to be used to show COBOL programs but is not very popular now). All of the Microsoft blogs that I've seen look that way, for example. No, not everything associated with Microsoft is evil. These are blogs of people who, like me, have been programming for decades and written hundreds of thousands of lines of code. These blogs are read by thousands of people. Most programming books that I have seen use a similar style - no line numbers, no alternating highlighted lines. Maybe a few books for beginning programmers use alternating highlighted lines. A few more use line numbers, such as in some of Knuth's examples when he is doing analysis of algorithms and needs to refer to specific line numbers. But much, maybe most, of the time people do not use line numbers when listing code. Richter's CLR via C#, for example, doesn't. Almost all the books about programming that I use do not use line numbers. The Cormen-Leiserson-Rivest algorithms book does use line numbers.
31 andrewshapira Feb 11, 2007 16:10
EdB wrote:
Why are you guys feeding a troll? First he has no blog then he installed it 5 days ago. Then he wants to display code but doesn't want to pay for a free plugin that'll do that. Now 'someone who wants to display code in his blog' is asking how html triggers a plugin.
Feeding trolls doesn't make them not be trolls.
Great, we're back to name-calling again. I ask for help about how to write a plugin and this is what I get. Thanks.
32 stk Feb 11, 2007 17:20
Andrew wrote:
Every blog I've ever seen with code in it displays code using a simple style without line numbers
LOL ... you really need to get out more. :p
33 stk Feb 11, 2007 17:32
Hmmm ... maybe many of the sites you've seen WANT line numbers and just don't know how?
Line numbers are useful when referring to a place in the code. Perhaps this isn't as true with the coding languages you are posting in your blog, but on the forum, it's common to reference a certain place in a PHP or XHTML file, into which people add or modify code. Refering to a line number is easier than saying "look for this [and having to spit out a bunch of code for people to match]".
You don't want line numbers? Fine.
But, I think that the fact most folks don't employ them on their blogs is more an indication that they don't don't know how or don't have the option, rather than a conscience choice. ;)
34 balupton Feb 11, 2007 17:41
Figured it was time for me to jump on board and find out why there are 3 pages for a simple question...
AndrewShapira, seems that all you want to do is remove some styling from the amcode plugin, why is that such a problem?
I'm using the amcode plugin on my own site, styled and hacked for my purposes though, and it's been treating me fine:
http://blogs.balupton.com/index.php?title=pimped_my_myspace&more=1&c=1&tb=1&pb=1
Surely the time of any one of us is worth more than doing such a small and insignificant change?
Now just like anyone here, i'm keen to help out, but in this case, there seems to be nothing to help with?
Correct me if i'm wrong...
35 andrewshapira Feb 11, 2007 17:58
balupton, I have already explained why I do not want to use amcode. I do not know why so many people are intent on trying to get me to use something that I do not want to use. At this point I have what seems to be a simple question. I will ask it again since it seems to be getting lost in the wonderful responses. I want to make my own plugin and am looking for information about the mechanism by which a <div class="xx"> element leads to a call to
RenderItemAsHtml(array &$params )
I did not see this in the URL about RenderItemAsHtml that someone pointed me to earlier.
36 balupton Feb 11, 2007 18:04
What RenderItemAsHtml does is it turns boring:
something boring
to
!something great!
So for example with the gallery plugin it turns
[evo_gallery]213012391023[/evo_gallery]
into a gallery.
So in your plugin you would use RenderItemAsHtml to turn something boring into your html code, usually by a regular expression...
I would imagine the easiest road to take for you to make your own plugin to do what you want would be to look at amcode's source and then strip it down to do what you want... Once you fully understand how plugins work then maybe building plugins from the ground up is a better option...
37 personman Feb 11, 2007 19:00
balupton is right about how the rendering system works and he's also right about the best way to learn the plugin system. Look at another plugin. b2evolution also ships with a Test plugin, another good place to get started. I wish you the best of luck on your quest for creating the plugin that meets your needs perfectly. That's the beauty of open source software and especially extensible software. However, at the risk of spoiling the ending, I'll point out a little detail. You've stated that you want to just paste in code and not bother with pre-processing it or manually entering html entities. You've also stated that you want the post, as it's stored in the database, to be xhtml valid. It's not possible to have both of those. That's why we need things like SimpleCode on the one hand, or AmCode on the other hand.
If you decide to create your own plugin, then we can't hold your hand every step of thte way. You'll have to read the documentation, open the source file for other plugins and read, install the test plugin and edit it to learn how the hooks work. If you get stuck then we'll be glad to help you. But you'll have to put in some effort up front. If you stick with it, then you'll end up with just what you need an everyone will be happy. You'll still end up with a solution that eiter a) preproccesses the code to make it valid in the db, or b) stores the code in the database as it is (xhtml invalid), but outputs something that is valid. b) will be very similar to amcode, even if it is styled differently and has a different keyword to wrap around your code.
38 personman Feb 11, 2007 19:13
I wasn't going to say anything more about amcode, but I did a quick edit to the css to show how easy it is to style.
[url=http://brendoman.com/dev/191/index.php/a/2007/02/11/amcode_test]Check it out[/url]
39 andrewshapira Feb 11, 2007 19:15
Thanks. Are you saying then that it is impossible to use <div class="xx"> and have the text inside the div area be forwarded as the argument in a call to RenderItemAsHtml(array &$params ) (or some other similar b2evo method)? That is, is it necessary to use foreign XHTML elements like <amcode> in order to get text to be passed to b2evo's RenderItemAsHtml method? I do not know XHTML all that well so maybe elements like <amcode> are valid XHTML. As I said I am an XHTML newbie. But the XHTML spirit does seem to be to avoid introducing foreign elements into the syntax, and to prefer <div> over foreign elements. So if there is a way to do it that way I would like to.
40 stk Feb 11, 2007 19:33
Andrew,
Andrew wrote:
is it necessary to use foreign XHTML elements like <amcode> in order to get text to be passed to b2evo's RenderItemAsHtml method?
No.
Andrew wrote:
I do not know XHTML all that well so maybe elements like <amcode> are valid XHTML. As I said I am an XHTML newbie.
I explained this already. :|
Let me try again, with different verbage.
Foreign tags are XHTML-valid ONLY IF the doctype of the page is eXtended to include it. (That's the "X" part of XHTML - "eXtensible").
HOWEVER ... it's kind of a catch 22 to do that, b/c of the push on the Internet for "web standards" (Standard set of HTML tags used, so each browser knows what tags to expect and every site is rendered in a similar fashion).
It's a double-edged sword ... you extend the doctype, you're suddenly "non-standard".
Personally, I'd only recommend extending the doctype for a large intranet situation and keeping standard doctypes for internet pages.
41 balupton Feb 11, 2007 19:34
http://doc.b2evolution.net/v-1-9/plugins/Plugin.html#methodRenderItemAsHtml
extracted directly from my digg plugin
/**
* @var string List of block elements (we want a paragraph before and after), excludes: address, added: td, th
*/
var $search;
var $replace;
/**
* Init
*/
function PluginInit( & $params )
{
$this->search = '#\['.$this->code.'](.+?)\[/'.$this->code.']#s';
$this->replace = 'Digg Plugin: Unknown Action.';
.......
}
/**
* Perform rendering
*/
function RenderItemAsHtml( & $params )
{
$content = & $params['data'];
$search = array(
'#\['.$this->code.']digg_this:compact:(.+?)\[/'.$this->code.']#s',
'#\['.$this->code.']digg_this:(.+?)\[/'.$this->code.']#s',
$this->search,
);
$replace = array(
'<script type="text/javascript">'."\r\n".
'//<![CDATA['."\r\n".
'var digg_skin = \'compact\'; '."\r\n".
'//]]>'."\r\n".
'</script>'."\r\n".
'<script type="text/javascript" src="http://digg.com/api/diggthis.js"></script>'."\r\n",
'<script type="text/javascript">'."\r\n".
'//<![CDATA['."\r\n".
'var digg_url = \'$1\'; '."\r\n".
'//]]>'."\r\n".
'</script>'."\r\n".
'<script type="text/javascript" src="http://digg.com/api/diggthis.js"></script>'."\r\n",
$this->replace
);
$content = preg_replace($search, $replace, $content);
return true;
}
/**
* We detect if our renderer gets used by looking at the content.
* @since 1.9
* required for renderers with lazy type
*/
function ItemApplyAsRenderer( & $params )
{
if( preg_match( $this->search, $params['Item']->content ) )
{
return true;
}
return false;
}
Should point you off in the right direction for how rendering works.
42 yabba Feb 11, 2007 19:35
personman wrote:
b) stores the code in the database as it is (xhtml invalid), but outputs something that is valid.
Remind me to show you the next version of the plugin ;)
andrew wrote:
Thanks. Are you saying then that it is impossible to use <div class="xx"> and have the text inside the div area be forwarded as the argument in a call to RenderItemAsHtml(array &$params )
function RenderItemAsHtml( & $params )
{
$params[ 'data' ] = preg_replace_callback( '#<div class="xx">([^>]+?)</div>#i', array( & $this, 'your_callback_function' ), $params[ 'data' ] );
}
function your_callback_function( $matches )
{
// ...... your code
}
ish :p
¥
43 andrewshapira Feb 11, 2007 19:53
Yabba, if that does what I think it does, that is cool.
One nice thing about using div is that one can use different code renderers with the same blog entry, without changing the blog entry. For example if I wanted to switch from a BlobCode plugin to a NewBlobCode plugin, or to a version of AmCode that recognized the div entries, I could do it without changing any blog entries.
Also, the XHTML inside the database would be valid XHTML, so that, say, I could write a tool to grab all the code from my blog entries. I don't know that I'd ever do that with code entries, but I could definitely see people wanting to do this with other kinds of entries that are processed by plugins.
Actually I wonder if, for code, it might be better to write the plugin to grab <code> text instead of <div class="xx"> text. Maybe I will do that instead. Now I know how to get going.
Thanks to those who helped out.
44 balupton Feb 11, 2007 19:57
instead of <code> or <div> you could do [my_plugin] .... but code would be the obvious choice i guess... Yabba how come code wasn't used in the amcode plugin, must be a reason?
45 stk Feb 11, 2007 20:13
balupton wrote:
how come code wasn't used in the amcode plugin, must be a reason?
There aren't many valid XHTML tags, which can be differentiated from themselves and extracted. ;)
Andrew wrote:
Thanks to those who helped out.
You're welcome.
46 yabba Feb 12, 2007 01:44
stk wrote:
balupton wrote:
how come code wasn't used in the amcode plugin, must be a reason?
There aren't many valid XHTML tags, which can be differentiated from themselves and extracted. ;)
Andrew wrote:
Thanks to those who helped out.
You're welcome.
Be honest, it's cos it looks cool to have our own tag :D
¥
47 balupton Feb 12, 2007 01:46
¥åßßå wrote:
Be honest, it's cos it looks cool to have our own tag :D
¥
Typical :roll: ;)
48 yabba Feb 12, 2007 01:48
At least we got it working huh? ;)
¥
Here is a great plugin for displaying code...
http://plugins.b2evolution.net/index.php/2006/07/13/display_code_plugin