Re: [midgard] Midgard Question: creating links
On 10 Jan, Emiliano Heyns wrote: (varname:u); mark up varname as URL. If $varname = "http://www.midgard-project.org/" then (varname:u); would expand to a href="http://www.midgard-project.org/"http://www.midgard-project.org//a Actually, the :u formatting means that the variable will be printed in URL-encoded format. This means that "Network Security RD" becomes "Network%20Security%20R%26D" (just an example from page I was working on). This is useful for passing text strings as GET or Midgard Active page arguments. (varname:f); mark up formatted text. Empty lines will be replaced with P will automatically, and you can include HTML markup in [...] delimiters (anything between those will be passed unchanged with the [ and ] removed. It does a great lot more but for the life of me I can't find the markup parser. There is also :F which makes all paragraphs shorter than 10 words without period a H2-level headline and lines beginning with a dash into unnumbered listings. My experience is that almost all of Web content will fit nicely in these rules, especially as you can embed HTML code into it as needed. Emile /Bergie -- -- Henri Bergius -- +358 40 525 1334 -- [EMAIL PROTECTED] -- http://www.iki.fi/Henri.Bergius -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
Re: [midgard] Midgard Question: creating links
Henri Bergius wrote: On 10 Jan, Emiliano Heyns wrote: (varname:u); mark up varname as URL. If $varname = "http://www.midgard-project.org/" then (varname:u); would expand to a href="http://www.midgard-project.org/"http://www.midgard-project.org//a Actually, the :u formatting means that the variable will be printed in URL-encoded format. This means that "Network Security RD" becomes "Network%20Security%20R%26D" (just an example from page I was working on). This is useful for passing text strings as GET or Midgard Active page arguments. Correct, my bad. I just located the parser, and I'll try to write a little something about its workings. Emile -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
Re: [midgard] Midgard Question: creating links
Alexander Bokovoy wrote: I don't look yet into 2.0 alpha sources about parser code but was it changed into module structure like other things did? Not in the version that is now in CVS, although that will naturally not necesarily be as up to date as the code that Jukka is still working on. If so, it is very good, I'd like to add some LaTeX-like formating after 1.2.6 will be released to make life easier for scientific applications of Midgard. Current implementation of parser has some limitations in extension scheme (you'll need to rewrite parser at least in two or three places in different packages), so modularizing it would be great. Actually, I've already have LaTeX-like formatting done in PHP using regular expressions and possibly support for PCRE in the text parser would be useful. I mean that text formating modules could use generalized API for accessing PCRE library like it is done with DB support. Seems like you allready put some thought in this. I would welcome this concept, so if you have ideas on this API I'd gladly discuss the remifications. Then creating parsers would be more efficient (it could be relatively simple to create parser for Word-like format, as those apps already done in Perl and C). Thus, we could achieve the same feature set that proprietary systems (like NPS) sell for thousands of dollars. Especially it would be great if those parsers could be dynamically loaded (hence, optimisation for memory footprint will be very effective). Also real document flow is impossible without those things. Hmm, nice. But the current parser does all it's work in memory; I'm not sure I'd want to serve many Word documents like this concurrently. If we want to use this we may want to have a way to circumvent this. Emile -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
[midgard] RE: FW: [midgard] a wee few questions about site strategies....
PERFECT! Getting AuthorName and not just author makes a big difference and playing with the difference between mgd_list_topic_articles_all, mgd_list_topic_articles mgd_list_topic_articles_fast is what I was looking forthe further into this I get the more impressed I am with all thought that you guys put into this. I tried to build my own over last summer and while it worked..for most of what it was supposed to do...the amount of code overhead I built into it to take care of all of the special cases which kept coming up just made me sicker and sicker.I feel guilty and dishonest just thinking about all of the ugly code my intern and I were responsible forMidgard is proving to be pretty elegant and for me that is probably the highest praise kp -Original Message- From: Emiliano [SMTP:[EMAIL PROTECTED]] Sent: Friday, January 07, 2000 4:46 PM To: Ken Pooley Subject:Re: FW: [midgard] a wee few questions about site strategies On Fri, 7 Jan 2000, Ken Pooley wrote: Well maybe I don't quite understand what I thoughtif I do this... ? $article = mgd_list_topic_articles_all(19); Ah, _now_ I understand. mgd_list_topic_articles_all gets all articles of the named topic (19) and all subtopics thereof. What you want is mgd_list_topic_articles or mgd_list_topic_articles_fast. Those will only return the articles of the named topic itself. if ($article) for ($i = 0; $i 5 $article-fetch(); $i++) { ? p stronga href="/news/(article.id);.html"(article.title);/a/strong br(article.aldate); ? if ($article-author) { ?br (article.author);br ? if ($article-abstract) { ?br (article.abstract);br I still get what seems to be an author ID number...should I be getting the author? Am I missnaming the place where the author info should live? mgd_list_topic_articles will have the author information in $var-authorname (and the author ID in $var-author of course). The _fast function does not set the authorname field, but you can get the information with mgd_get_person($var-author) if you want to (but it'll be less fast than the regular list). Emile -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
[midgard] creating links/lost
I posted a question to see if it's possible to create a link within Midgard by highlighting the text within the content then have a dropdown menue with the page id's to select for the link. I'm not sure I was able to follow some of the responses,so if someone could repost on this feasiblity with javascript or PHP I would appreciate it. Thanks, Corbin Harris [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
Re: [midgard] creating links/lost
Hi Corbin- I think that the short answer is no...having just read the first thread you posted to the list, I recall that you are a dreamweaver user. I use dreamweaver myself, and I think I see your angle on this. Let me see if I understand you correctly. You want to highlight a bit of text in the content that you are typing into the midgard interface, and have a dropdown box that lists all the pages on the site. When you select one page from the box, the link is automatically created. Is that correct? If so, then the answer is probably no. Typing the anchor tag is by far simpler than writing whatever code you would have to write to make midgard's admin site act like a wysiwyg editor. Midgard's administrative tools are simply a set of web pages, which allow you to relate bits of code together into a coherent website. Those bits of code might be php or html, but they all have to be inserted into the midgard database, which means typing them into the admin website, or cutting and pasting from applications like dreamweaver. That's a manual process, but there are things you can to do speed it up. My recommendation to you is similar to what I'm doing- Prototype the look of your site in dreamweaver, where you can use it's conveniences to speed that process. Then drop the components of that template (header, navigation bar footer, etc) into Midgard, using its style administration tools. After that, you can start to stick content into the style you've created using midgard's other tools, plus the appropriate php code to make it function like your bosses want it to. Best of luck... Darren Petersen Gresham OR Corbin Harris wrote: I posted a question to see if it's possible to create a link within Midgard by highlighting the text within the content then have a dropdown menue with the page id's to select for the link. I'm not sure I was able to follow some of the responses,so if someone could repost on this feasiblity with javascript or PHP I would appreciate it. Thanks, Corbin Harris [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
Re: [midgard] creating links/lost
Darren, Thanks for your response. This has been my main concern about Midgard and a commercial system E-grail from Guiworks - http://guiworks.com - that I'm looking into. Both systems work in the same manner I was hoping that there would be a way to ad this feature. Thanks, Corbin Harris [EMAIL PROTECTED] -- From: Darren Petersen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [midgard] creating links/lost Date: Mon, Jan 10, 2000, 6:46 PM Hi Corbin- I think that the short answer is no...having just read the first thread you posted to the list, I recall that you are a dreamweaver user. I use dreamweaver myself, and I think I see your angle on this. Let me see if I understand you correctly. You want to highlight a bit of text in the content that you are typing into the midgard interface, and have a dropdown box that lists all the pages on the site. When you select one page from the box, the link is automatically created. Is that correct? If so, then the answer is probably no. Typing the anchor tag is by far simpler than writing whatever code you would have to write to make midgard's admin site act like a wysiwyg editor. Midgard's administrative tools are simply a set of web pages, which allow you to relate bits of code together into a coherent website. Those bits of code might be php or html, but they all have to be inserted into the midgard database, which means typing them into the admin website, or cutting and pasting from applications like dreamweaver. That's a manual process, but there are things you can to do speed it up. My recommendation to you is similar to what I'm doing- Prototype the look of your site in dreamweaver, where you can use it's conveniences to speed that process. Then drop the components of that template (header, navigation bar footer, etc) into Midgard, using its style administration tools. After that, you can start to stick content into the style you've created using midgard's other tools, plus the appropriate php code to make it function like your bosses want it to. Best of luck... Darren Petersen Gresham OR Corbin Harris wrote: I posted a question to see if it's possible to create a link within Midgard by highlighting the text within the content then have a dropdown menue with the page id's to select for the link. I'm not sure I was able to follow some of the responses,so if someone could repost on this feasiblity with javascript or PHP I would appreciate it. Thanks, Corbin Harris [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED] -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]
Re: [midgard] creating links/lost
On Mon, 10 Jan 2000, Darren Petersen wrote: You want to highlight a bit of text in the content that you are typing into the midgard interface, and have a dropdown box that lists all the pages on the site. When you select one page from the box, the link is automatically created. Is that correct? If so, then the answer is probably no. Typing the anchor tag is by far simpler than writing whatever code you would have to write to make midgard's admin site act like a wysiwyg editor. Midgard's administrative tools are simply a set of web pages, which allow you to relate bits of code together into a coherent website. Those bits of code might be php or html, but they all have to be inserted into the midgard database, which means typing them into the admin website, or cutting and pasting from applications like dreamweaver. That's a manual process, but there are things you can to do speed it up. This sums it up pretty well. It is possible to construct a dropdown list that uses javascript to append a link to the text in the edit box, but this would not work with the highlighting you requested. But there is a way that this *would* work: java applets. It is not only feasable but actually a major kick*ss idea if you ask me. The applet would need some heavy smarts about the backend (or better yet, a backend with a more structured approach then HTTP -- maybe corba) but definately doable given enough time (sigh). Which means, yes, theoretically possible, but don't hold your breath. Emile -- This is The Midgard Project's mailing list. For more information, please visit the project's web site at http://www.midgard-project.org To unsubscribe the list, send an empty email message to address [EMAIL PROTECTED]