[midgard] PHP4 PHPlibs.
Hi guys. I was wondering, if I install PHP4/PHPlib on the same machine that I got Midgard on, can I use PHP4/PHPlib functions and code in midgard? And, is it worthwhile to install PHPlibs and PHP4 or is everything in PHPlibs implemented in PHP4? Tarjei
RE: [midgard] attachments / Blob usage
Hi, - create an attachment The easyest way of doing this is to install Framed admin. Framed Admin from www.hklc.com has the needed code to attach blobs to articles and styleelements. - get it into the blob dir What are you thinking about? Getting into a blobdir to send a blob (for instance in an IMG tag)? I thought of making code for serving blobs on every page, but found it to bothersome. Instead I created a subpage with the following in "code-init" : ? if ($argc == 1) { mgd_serve_attachment($argv[0]); exit; } ? Basicly thats all you need to serve a blob. After getting the blob's id, you attach it to the path and send it a long. For example: Say you got sevral articles with a blob attached. Heres the code I use to get the articles display the attachments. (the cod-init code is in the img dir). Sorry for the cluttering part on img-size. If you want to use it, have a look at http://marc.theaimsgroup.com/?l=midgardm=97025763708552w=2 and onwards discussions in that thread. (I thought I published the whole codelisting for the nodhtmlpickimage_attach page, I'll get back to that later. ? $article = mgd_list_topic_articles_all(14,"dato",1); // Her begynner for setningen som lager hvert artikkelelement. if ($article) for ($i = 0; $i 6 $article-fetch(); $i++) { if ($article) { $topic = mgd_get_topic($article-topic); $art = mgd_get_article($article-id); $att = $art-listattachments(); } $lvar = fvar($article); // gir $lvar et innhold ? SPAN id="dato"(article.date);: br/SPAN SPAN id="header" (article.title:h);br/SPAN ? if (gettype($att) == object) for ($j = 0;$j1 $att-fetch();$j++) { $mimetype = substr($att-mimetype,0,5); if ($mimetype == "image") { $img = mgd_get_attachment($att-id); if ($img-size_x150 or $img-size_y150) { if (strlen($img-size_y)==0) { ? img src="http://;(url);/img/(att.id);" type="(att.mimetype);" alt="(att.title);" align="right" ? } else { ? img src="http://;(url);/img/(att.id);" height="(img.size_y);" width="(img.size_x);" type="(att.mimetype);" alt="(att.title);" align="right" ? } } } } ? SPAN id="abstract" (article.abstract:h);/SPAN DIV align="left"a href="(lvar);(article.id);.html" class="lesmer" les mer nbsp;nbsp;/a hr size="1"/DIV ? } // For over }? I hope I haven't doubled on Emile's stuff. Tarjei - assosiate it with an element of midgard (short snippets of functioncalls should be enough) Live long and prosper! Torben Nehmer -- ICQ-ID : 14148813 WWW : http://www.nathan-syntronics.de E-Mail : [EMAIL PROTECTED]
RE: [midgard] snippets and global vars (1.4beta4)
Hi, Alab Did you manage to get things up and running with Twig? How did you do it? Tarjei -Original Message- From: Alan Knowles [mailto:[EMAIL PROTECTED]] Sent: 3. oktober 2000 15:32 To: [EMAIL PROTECTED] Subject: RE: [midgard] snippets and global vars (1.4beta4) Actually the trick is using the twig libraries, overlaid with FastTemplate - to allow user interface customization. The user account info is stored as preferences on the logged in user's person object. Since TWIG makes heavy use of SQL calls, hopefully I will be able to replace these with midgard calls, as midgard provides pretty much a full set of equivilant information... The code is viewable at http://demo.hklc.com/cgi-bin/cvsweb/page/Framed%20Admin%201b1. page/rcs.page/org_email.element.php3?rev=1.3content-type=text /x-cvsweb-markup http://demo.hklc.com/cgi-bin/cvsweb/page/Framed%20Admin%201b1. page/rcs.page/org_twig.element.php3?rev=1.1content-type=text/ x-cvsweb-markup for the stylesheet http://demo.hklc.com/cgi-bin/cvsweb/style/testing%20template.s tyle/organizer.element.php3?rev=1.1content-type=text/x-cvsweb-markup and for a midgardized FastTemplate http://demo.hklc.com/cgi-bin/cvsweb/style/testing%20template.s tyle/FastTemplate.element.php3?rev=1.1content-type=text/x-cvs web-markup Twig is imported into the snippets dir using the code under import/snippets in the v2 Framed Admin (it's pretty beta though, It failed on importing Open Merchant PHP) regards alan Tarjei Huse [EMAIL PROTECTED] said: Hi, going through the steps of integating twig as a snippet dir package Wow. If you manage to include twig, would you mind posting a howto or codelisting on the list? I'd love to have TWIG included (as I would guess many would). It would make Midgard ideal for intranets. Tarjei -Original Message- From: Alan Knowles [mailto:[EMAIL PROTECTED]] Sent: 3. oktober 2000 14:23 To: [EMAIL PROTECTED] Subject: [midgard] snippets and global vars (1.4beta4) I've got 1.4beta4 on the development server and was just going through the steps of integating twig as a snippet dir package, however it is having alot of trouble accessing global vars?? Is that an old bug??? (or is it too late in the evening here?) eg. - in a host page $config[test] = "fred"; mgd_include_snippet("testpage/testpage"); - in the snippet testpage/testpage echo $config[test]; regards alan -- Technical Director Linux Center (HK) Ltd. www.hklc.com -- 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] -- Technical Director Linux Center (HK) Ltd. www.hklc.com -- 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] favicon.ico and active pages
AFAIR even if it is a valif icon but not 16x16 pixels in a specific depth it is ignored by IE. Do you mean that the ICOn mus be 16 X 16 px and not 32 x 32? Tarjei 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] -- 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] snippets and global vars (1.4beta4)
Hi, going through the steps of integating twig as a snippet dir package Wow. If you manage to include twig, would you mind posting a howto or codelisting on the list? I'd love to have TWIG included (as I would guess many would). It would make Midgard ideal for intranets. Tarjei -Original Message- From: Alan Knowles [mailto:[EMAIL PROTECTED]] Sent: 3. oktober 2000 14:23 To: [EMAIL PROTECTED] Subject: [midgard] snippets and global vars (1.4beta4) I've got 1.4beta4 on the development server and was just going through the steps of integating twig as a snippet dir package, however it is having alot of trouble accessing global vars?? Is that an old bug??? (or is it too late in the evening here?) eg. - in a host page $config[test] = "fred"; mgd_include_snippet("testpage/testpage"); - in the snippet testpage/testpage echo $config[test]; regards alan -- Technical Director Linux Center (HK) Ltd. www.hklc.com -- 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] Asgard: and Framed Admin v3
Hi, I loved the new framed admin, bu this looks realy cool. Just a few things. I'd be hapy if you continued to implement the added parameters (size_x, size_y size_XY) that was discussed here earlyer although the best thing would be if the values could be added to the blobs table as optional fields(It would be against database theory, but since blobs are mostly used for images, a good idea). I'll come with more input later. Tarjei -Original Message- From: Alan Knowles [mailto:[EMAIL PROTECTED]] Sent: 30. september 2000 18:21 To: [EMAIL PROTECTED] Subject: RE: [midgard] Asgard: and Framed Admin v3 Interesting ? Any chance of getting cvsweb up on the code??? From the comments I've seen so far and from hacking away at the new version of the framed admin interface (nicknamed v3). very early versions viewable on http://www.hklc.com/dump/framedadmin_v3.jpg http://www.hklc.com/dump/framedadmin_v3a.jpg I have a half finnished spec on the new design, but I get very bored writing it so I generally end up hacking the code... resizing boxes. eg. textboxes to fit the screen.. - the original framed admin used cookies to store a series of values for box sizes.. - This has been extended a bit on v3 by generating the frameset with javascript, then adding these lines in if (navigator.appName.indexOf("Microsoft") != -1) { windowwidth= document.body.clientWidth; windowheight= document.body.clientHeight; }else{ windowwidth= window.innerWidth; windowheight= window.innerHeight; } This then pumps varialbes into urls, on the frames - then taken by the cookies and stored to remember the window size.. - still testing it!!! - but it seems OK. Graphic Design on v3: Having spent 1 evening pondering over the design of the current framed admin, and playing about laying it out.. It became very clear that there was __Far__ too much information on the screen. Basically a lay person would probably just want to go in and use the DHTML editor, change a bit of text, and say 'OK' - the huge number of boxes and options (although usefull) did not seem to help this.. To solve this, I have added extensive use of layers - this seems to work, but I did get comments that there may be problems with chinese and netscape - however, I have yet to experience any issues, or see any evidence of this. One of the issues that came up with the current framed admin was that you could not attach a image to a new article or style etc. - this was because when you are editing a new page, it does not have an id to attach to - so the new system makes you create the article first, with a name, then you are editing an article that exists. The design layout has certian aspects taken from mozilla, basically as I'm too lazy to come up with a better interface design - the colours of the editing window (basically the yellow) will proably be changed to grey, in keeping with the theme - along with new button designs... Tree navigation on v3: I spent quite a while getting a javascript tree working with the early version of v3, This allowed navigation of the the tree without pulling pages from the server. However, I found on small sites this was fast and efficient, but on a large site ( 1000) pages it would hang the browser for about 1-2 minutes. In the end, I ended up writing/hacking a new tree browser, that is used for all the navigation. (it's in the tree.element.php and tree_function.element.php3 Coding design on v3: take a look at http://demo.hklc.com/cgi-bin/cvsweb/page/Framed%20Admin%201b1. page/rcs.page/ The code for beta1 (or v2) was a gentle manipulation of the original admin site. This meant that it could be put together very quickly (give or take the learning curve..).. however when it came to giving the code to some of our other programmers, it was an up hill struggle to get to grips with the heavy mixing of PHP an HTML layout. It does seem that as a Content/Application Management System midgard is encouraging the end users to seperate as much as possible the 'code' from the 'style' - however the basic admin system is a poor example of this. Basically v3 is a total ground up build of the admin site (eg. very little old code remains).. The RCS page now contains the Code (with a big C!) for the whole admin site - The theory being that since all the elements in midgard a very similar, the code to read and write them would also be similar... The only difference is how this is displayed to the user. Other than this, the bit that is not visable is a modified FastTemplate php library which reads from midgard styleelements rather than files. - this should mean that translating the admin interface should just be a mater of giving the files to a graphic designer or secretary?? and letting them type it up After many hours of
RE: [midgard] Asgard: What do you think ?
Hi I Love the new look, a suggestion that might be a good thing would be to make a scaled down "user" version for people just adding content. On editing: Is it possible to make txtbox'es that are resizeable (i.e height=100%, width=100% type thing) so we don't have to change that our selves. Also, remember to slim down on graphics use in regard of download/update time. Tarjei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 29. september 2000 13:26 To: [EMAIL PROTECTED] Subject: Re: [midgard] Asgard: What do you think ? well here is the comments I just made live to David (we are sitting across the same desk at AUrora): Attached to this message, you'll find the first graphic design proposition of the new administration site. Please tell me ASAP if you like it, or why you don't like it. the graphics and the layout are great, colors too. Maybe the top fields take much space regarding the info they contain. when working on a site, I am mostly working on the 'content' field. perhaps hideable fields, or a 'content-modify' mode where you only see the content, already in modify mode ?? -- simon kerr -- 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] Asgard: What do you think ?
Hi Some thoughts on groups. In todays admin's the groups are listed one after the other. But, the groups are an hieracy so why not display them as a tree instead? Also it would be a good idea to list what pages the group owns and what accessrights it has to the page / pageelement / article etc. Tarjei -- 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] Re: blobls and blobsize
Hi, I checked the code for GetImageSize, and saw that if you do $att-parameter('size', 'HW', $size[3]); together with the two other parameters, you get an finished formated string for putting into a img tag. thats something to add to the script - at least it saves me for a lot of coding misstakes :) Tarjei $att-parameter('size', 'x', $size[0]); $att-parameter('size', 'y', $size[1]); If you later would do $att = mgd_get_attachment($id); you would have $att-size_x and $att-size_y available. 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] -- 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] Asgard: What do you think ?
I support this idea totaly! Very cool! Tarjei -Original Message- From: Jian Wang [mailto:[EMAIL PROTECTED]] Sent: 29. september 2000 21:59 To: [EMAIL PROTECTED] Subject: Re: [midgard] Asgard: What do you think ? A suggestion for the scaled down "user" version: how about put a check box above the body text to specify if using HTML tags or not. For "normal" users, it might be weired and annoying to put p before each paragraph. I believe that HTML tags other than p are not necessary for at least 80% of the articles. Only advanced users may need or want to use the extra presentation power of tags. Best regards, Jian - Original Message - From: "David Guerizec" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 29, 2000 7:18 PM Subject: RE: [midgard] Asgard: What do you think ? I Love the new look, a suggestion that might be a good thing would be to make a scaled down "user" version for people just adding content. I'm thinking about it too... On editing: Is it possible to make txtbox'es that are resizeable (i.e height=100%, width=100% type thing) so we don't have to change that our selves. Actually, there is an option page that allow any user to chose the size of the edit boxes. Note that percents don't work with textareas (at least on Netscape). Also, remember to slim down on graphics use in regard of download/update time. There will not be much graphics, and only the first page will (maybe) be slow. Once you get all in the cache, it's faster. Tarjei -- Best Regards, David Guerizec - Open Source Developer @ AurorA RD -- 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] problems with mgd_updage
The patch worked. Thanks Emile. Tarjei -Original Message- From: Emiliano [mailto:[EMAIL PROTECTED]] Sent: 27. september 2000 00:46 To: [EMAIL PROTECTED] Subject: RE: [midgard] problems with mgd_updage Tarjei Huse wrote: My version is the latest beta, 1.4beta5b. Thanks a lot. 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] problems with mgd_updage
Hi, Emile answered the question on mgd_update_article_created. I was just wondering, Emile, do you have a patch? Tarjei -Original Message- From: Tarjei Huse [mailto:[EMAIL PROTECTED]] Sent: 25. september 2000 18:05 To: [EMAIL PROTECTED] Subject: [midgard] problems with mgd_updage Hi all, First a small question: Will the new admin interface contain an admin interface for event handling? Now, on to the big one. I've got problems with the mgd_update_article_created function. Basicly I supply it with an unix timestamp and everything, but the fields does not get updated. Here's the code, what is the problem? ? $topic = 14; $article= mgd_list_topic_articles_all($topic); if ($article) while ($article-fetch()) { $date = "$article-extra1"; // Delimiters may be slash, dot, or hyphen $created = $article-created; $lng = strlen($date); if ($lng == 10 ereg( "([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})", $date, $regs ) ) { list( $month, $day, $year ) = split( '[/.-]', $date ); // sjekker for 01 02 osv... if (strpos($day,0)==0) { $day= substr($day,1); } if (strpos($month,0)==0) { $month= substr($month,1); } // ferdig med det. $timestamp = mktime(0,0,1,$month,$day,$year); $date2 = date ("d.m.Y",$timestamp); $datecreated = date("d.m.Y",$created); $id = $article-id; if (date("d.m.Y",$created) != $date) { echo "starter opp konverteringbr"; if (mgd_update_article_created($id,$timestamp)) { echo "article has new created date $date, timestamp: $timestamp"; } else { echo "ingen konvertering!"; } } // de to over er mgd biten } // avslutter if ereg } // avslutter while ? Tarjei -- 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] Beta test status report
Hi, I'm not an expert at installing midgard, but my experience is that you have to install the blobtable and configure the blob directory (or something. look into the blob documentation). When that is done, imageupload is the best thing since the wheel ,) Tarjei -- 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] problems with mgd_updage
Hi o'guru Emile. My version is the latest beta, 1.4beta5b. Thanks a lot. T -Original Message- From: Emiliano [mailto:[EMAIL PROTECTED]] Sent: 26. september 2000 19:55 To: [EMAIL PROTECTED] Subject: RE: [midgard] problems with mgd_updage Tarjei Huse wrote: Emile answered the question on mgd_update_article_created. I was just wondering, Emile, do you have a patch? Sure, for what version? 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] -- 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] problems with mgd_updage
Hi all, First a small question: Will the new admin interface contain an admin interface for event handling? Now, on to the big one. I've got problems with the mgd_update_article_created function. Basicly I supply it with an unix timestamp and everything, but the fields does not get updated. Here's the code, what is the problem? ? $topic = 14; $article= mgd_list_topic_articles_all($topic); if ($article) while ($article-fetch()) { $date = "$article-extra1"; // Delimiters may be slash, dot, or hyphen $created = $article-created; $lng = strlen($date); if ($lng == 10 ereg( "([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})", $date, $regs ) ) { list( $month, $day, $year ) = split( '[/.-]', $date ); // sjekker for 01 02 osv... if (strpos($day,0)==0) { $day= substr($day,1); } if (strpos($month,0)==0) { $month= substr($month,1); } // ferdig med det. $timestamp = mktime(0,0,1,$month,$day,$year); $date2 = date ("d.m.Y",$timestamp); $datecreated = date("d.m.Y",$created); $id = $article-id; if (date("d.m.Y",$created) != $date) { echo "starter opp konverteringbr"; if (mgd_update_article_created($id,$timestamp)) { echo "article has new created date $date, timestamp: $timestamp"; } else { echo "ingen konvertering!"; } } // de to over er mgd biten } // avslutter if ereg } // avslutter while ? Tarjei -- 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] Blobls revivisted; Anyone know how to know blob imagesize?
Hi, Emile wrote: I have omitted direct access to the blobs as a feature, because this way I could control access to them fully via the midgard API, but this may indeed be sacrificing too much. What do you all say? I don't need to access the blobs dirctly, but I guess there are some who will. Btw. I suggest that we build inn some fileattribute fields innto the blob / parameter table. I must admitt I spent the better of some hours trying to build it into my existing fadmin - withouth manageing to find out where to start. I think this should be features in Aasgard and (if needed) changes in the blobtable. What I suggest is basicly that we can do a listattachments() and then a fetch and be able to check the object comming for filesize, imagewidth and imageheight. Maybe there are more attributes worth checking for, but since you need to set these upon uploading the image I find it a natural thing to put into the admin codes. I guess I'm crying out for my sick mother here, but It seems to me that knowing f.eks image sizes is a point when letting (l)users use attachments for different things. My horror is the user puting a 250+ k imagefile in their article without thinking Tarjei -- 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] to the manual.
Hi, A little layout tip: I think you should display a link to each function in funcref in the same way as you do in the manual index reference. Usualy, if you're using the funcref it is because you need a function, thous such a layout would save a lot of clicks (and irritation). Tarjei -- 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] Blobls revivisted; Anyone know how to know blob image size?
Hi, Many thanks to Ron and David for the discussin script - I haven't come around to test it yet. I got a completly different question though: How can I find out the size of an image I got stored as a blob? Is it at all possible? Could it be done at upload time in the admin script? I guess the browser will know the exact size of the image when it displays it without height and width attributes set, so this might be something to implement in the framed admin add image function. The browser displays the image and wolia we could get the size using dhtml or some other clientside scripting. I must honestly say that this is way above what I can do, but I think it's something that could be worth implementing in the admin site. Knowing image size when doing the display could be usefull in getting the pages to render fast and omit images that are to large for the context. Tarjei -- 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] Question regarding sitegroups and the adminsite.
I've been working with sitegroups the last few days, and I'm wondering about a few things. 1. What is the difference between root(*) , admin(!) and user(+) access to a domain? 2. I'm not toatly inn on what's happening on with the admin site, but I'd like to propose that we develop some ekstra admin functions in it, maybe someone allready has done this, then it should not be to troublesome: - We should include an interface for copying and moving articles from one topic to another. Also a simmilar function for pages and elements. I've attached the code for a form I've made for moving articles between topics. It's not too good, but a start. - How about making a sitegroup interface for the admin site? Only viewable by root and sg admins. BTW: the framed admin is working just wonderfull! I realy like it. Tarjei -- 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] Format question
Hie echo $topicS-description:H."br"; ? I'm not sure, but I think it's only possible to use the :h :p etc. in the html variable strings. Like this: instead of : echo $topicS-description:H."br"; do ? (topics.description:H);br ?php ... Tarjei -Original Message- From: Emiliano [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 11, 2000 1:45 PM To: [EMAIL PROTECTED] Subject: Re: [midgard] Format question Ken Pooley wrote: I am so proud of my self...I got he following to work all by myself...and on a monday morning too! I don't seem to be able to get it to read a :f or :h for the text formatting...any suggestions? Read it from where? 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] -- 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] getting the blobs related to an article
Hi, It's late and I've finaly managed to get blobs working. I just wanted to say one thing, as it has caused me 10 - 12 hours of work before I found out where the problem was. DO NOT LEAVE WHITESPACE OR ANYTHING BEFORE A MGD_SERVE_ATTACHMENT() call!!! (well almost. As long as it's between php tags and doesn't echo it's ok..) I used Emiles code, did everything right, but could not make it work. After a lot of poking around I tried to go to the uri (/displaypage/artID/attachmentID) and god the errormessage that a header was allready sent before the attachment header. The problem originated from a white-space in code-global I hope this posting might save someone some time. Tarjei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 7. september 2000 12:21 To: [EMAIL PROTECTED] Subject: Re: [midgard] getting the blobs related to an article Tarjei Huse wrote: I've tried a number of things to manage to get attachments. Basicly I've added attachments through the "add image" in fadmin. But: It is impossible to call them back! At lest it seems so. Does anyone have the code to get the attachments of an article, and display the file (gif or jpeg) in the listing. THis is a listing of articles and their abstracts, and I want to disply pitcures with the articles. I have no intimate knowledge of fadmin, but I suppose this would work: have a active page /displayarticle with content: ? if ($argc == 0) { echo "No article selected" } else { if (! ($article = mgd_get_article($argv[0]) ) { echo "No article ", $argv[0]; } else { ? H1(article.title);/H1 (article.abstract:f);p ? $att = $article-listattachments(); echo "DL" while ($att $att-fetch()) { /* test $att-mimetype here if you're not sure that all attachments are images */ echo "DTIMG SRC=\"/displayarticle/", $argv[0], "/", $att-id, "\""; echo "DD", $att-title; } echo "/DL"; } ? attach a page element 'code-init' with content: ? if ($argc == 2) { /* display blob */ mgd_serve_attachment($argv[1]); exit; } ? 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] -- 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] getting the blobs related to an article
Hi Emile! I tried your script, and got the error: "Fatal error: Call to unsupported or undefined function listattachments() in content on line 47" Is this an instalation error? How do I change it? We have just upgraded to beta5, so everything should be in order. Please help (and thank's A LOT for all your help already). Tarjei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 7. september 2000 12:21 To: [EMAIL PROTECTED] Subject: Re: [midgard] getting the blobs related to an article Tarjei Huse wrote: I've tried a number of things to manage to get attachments. Basicly I've added attachments through the "add image" in fadmin. But: It is impossible to call them back! At lest it seems so. Does anyone have the code to get the attachments of an article, and display the file (gif or jpeg) in the listing. THis is a listing of articles and their abstracts, and I want to disply pitcures with the articles. I have no intimate knowledge of fadmin, but I suppose this would work: have a active page /displayarticle with content: ? if ($argc == 0) { echo "No article selected" } else { if (! ($article = mgd_get_article($argv[0]) ) { echo "No article ", $argv[0]; } else { ? H1(article.title);/H1 (article.abstract:f);p ? $att = $article-listattachments(); echo "DL" while ($att $att-fetch()) { /* test $att-mimetype here if you're not sure that all attachments are images */ echo "DTIMG SRC=\"/displayarticle/", $argv[0], "/", $att-id, "\""; echo "DD", $att-title; } echo "/DL"; } ? attach a page element 'code-init' with content: ? if ($argc == 2) { /* display blob */ mgd_serve_attachment($argv[1]); exit; } ? 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] -- 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] getting the blobs related to an article
Thank's Emile, here's the output: o:30:{s:1:"N";i:1;s:7:"__res__";i:135563328;s:5:"fetch";i:0;s:2:"id";s:3:"10 8";s:4:"name";s:43:"Forurensningsgebyr til grunneier i Tønsvika";s:5:"title";s:50:"Forurensningsgebyr til grunneier i Tønsvika";s:8:"abstract";s:187:"Tromsø Natur og Ungdom er svært glad for at Kommunen nå endeleig har skjønt alvoret i situasjonen med ulovlig forsøpling i Tromsø kommune. ";s:7:"content";s:1463:"Tromsø Natur og Ungdom er svært glad for at Kommunen nå endeleig har skjønt alvoret i situasjonen med ulovlig forsøpling i Tromsø kommune. Ileggelse av forurensningsgebyr er en bra måte å synliggjøre at ulovlig avfallsdumping og forbrenning ikke skal lønne seg. Tromsø Natur og Ungdom offentliggjorde nylig en rapport som beskriver tilstanden i strandsona rundt Tromsøya. Rundt et førtitalls ulovlige fyllinger med alt fra vanlig søppel til bilvrak preger det som skal vær frilufts og rekreasjonsområde for tromsøfolk. Denne forsøplingen er et resultat av en slett holdning til miljø blandt en del av byens entrepenører og en svikt i det offentlige forvaltningsapparatet som skal hindre slik type kriminalitet. Her har kommunen tidligere vært alt for sløv. Til og med kommunens egne eiendommer bryter med forurensningsloven enkelte steder. Bøteleggelsen av grunneieren i Tønsvika markere forhåpentlig vis en holdningsendring i denne type saker fra kommunens side. Tromsø Natur og Ungdom er imidlertid spent på om kommunen har tenkt å være konsekvent og bøtelegge seg selv for de søppelfyllinger som finnes på kommunale eiendommer rundt omkring. Pressekontakt: Johannes Fjell Hojem 995 32 170 eller 71 64 81 27 ";s:6:"author";s:1:"5";s:10:"authorname";s:11:"Tarjei Huse";s:5:"topic";s:2:"36";s:4:"date";s:10:"23.07.2000";s:5:"adate";s:14:"23 rd Jul. 2000";s:6:"aldate";s:14:"23rd July 2000";s:3:"url";s:0:"";s:4:"icon";s:1:"0";s:6:"extra1";s:0:"";s:6:"extra2";s :1:"1";s:6:"extra3";s:0:"";s:5:"score";s:1:"0";s:4:"type";s:1:"1";s:7:"creat ed";s:9:"964371156";s:7:"creator";s:1:"5";s:7:"revised";s:9:"968159384";s:7: "revisor";s:1:"1";s:8:"revision";s:1:"5";s:6:"locked";s:1:"0";s:6:"locker";s :1:"0";s:8:"approved";s:1:"0";s:8:"approver";s:1:"0";} Tarjei Yes, this should definately work with b5. Comment out the attachment list for a moment and 'echo serialize($article);' instead, and let's see what functions are defined on the article. 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] -- 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] getting the blobs related to an article
Hi! I've tried a number of things to manage to get attachments. Basicly I've added attachments through the "add image" in fadmin. But: It is impossible to call them back! At lest it seems so. Does anyone have the code to get the attachments of an article, and display the file (gif or jpeg) in the listing. THis is a listing of articles and their abstracts, and I want to disply pitcures with the articles. Tarjei -- 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] getting articletypes
Hi, I need a way to fetch articles of multiple "types" and list them by date. Is there some way of doing this? I've been trying various ways with mgd_list_topic_articles_all(int topic, string [sort], int [type]), but they don't seem to do what I want. Does anyone have a solution? Ron wrote: Will you license the document GFDL? Yup. I think so. Most problably we'll try to get the document posted on the midgard site someway. Tarjei -- 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] Moving articles.
-- 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] Problem with the manual.
Hi. when I go to Article Object Definition in the manual I get the Attachment Object Definition. Is this wrong? Is it going to be fixed? Also, I can't get the update() function to work on an article. Heres the script: ?php 2: function listpage($id) 3: $list = mgd_list_pages($id); 4: while( $list-fetch() ) 5: echo "h1Side:".$list-name . ":/h1"; 6: echo "ID:". $list-id . "brbr"; 7: $list-sitegroup = "2"; 8: $list-update(); 9: echo "$list-sitegroup"; and so on. Basicly I get the message: unknown function update. Whats wrong? Tarjei -- 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] getting articletypes
Hi, I need a way to fetch articles of multiple "types" and list them by date. Is there some way of doing this? I've been trying various ways with mgd_list_topic_articles_all(int topic, string [sort], int [type]), but they don't seem to do what I want. Does anyone have a solution? Ron wrote: Will you license the document GFDL? Yup. I think so. Most problably we'll try to get the document posted on the midgard site someway. Tarjei -- 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] Copying articles.
As far as I can understand the following code it doesn't solve problem #1 you've mentioned before and which is described in your Subject line. For copying (or moving them) in Midgard 1.4 you should use mgd_copy_article()/mgd_move_article() which is documented in Manual. My fault there. THe idea was to keep the mail in the topictree of the maillist archive. I solved the article moving problem - thanks. Tarjei [strip-code] Afte a month in development we're soon finished with our new midgard site. There's a few things left (SG for one). I got two questions: 1. Does anyone have some code for the admin site so that I can copy/move an article to another topic? As a result of a missunderstanding I will need to move ca 100 articles around. :-( [strip-code] -- Alexander Bokovoy Minsk Linux Users Group | http://www.minsk-lug.net/ The Midgard Project | http://www.midgard-project.org/ IPLabs Linux Team | http://linux.iplabs.ru/ Necessity hath no law. -- Oliver Cromwell -- 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] Copying articles.
Hi. Thanks for pointing me in the right direction (=RTFM). I'm not sure what you guys like when it comes to the end results, but I'm posting the on the list so others comming later can use the code. Comments are welcome. What this function does is to take a topic id and return to variables, var and lvar, where $lvar is the parent topics to the topic. The code is used to tell the user where he or she is in the topic structure, and I'm using a modified version to make links independant of where in the topic tree the article is. For many of you this might seem trivial, but I've spent some time on finding this out. It might be an idea to put the snippet (or something simmilar) into the midgard documentation. Tarjei -code for getting the topic part of an article link--- function fvar($article) { $i = 0; for ($t = mgd_get_topic($article-topic); $t; $t = mgd_get_topic($t-up)): $a[]; $a[$i] = "$t-name"; $i++; endfor; for ($j=$i-2;$j-1;--$j): // I did not need the first level in the content tree, do $j=$i-1 if you want it included $var; $lvar .= "$a[$j]/"; $var = "$a[$j]"; endfor; return $lvar; } -Code for a simple location link --- ?php // this code relies on putting a $topic= topicnum; into code-init on the different subpages. $i = 0; $lvar = "$url/"; // var brukes til å lage linken ? nbsp;nbsp;nbsp; a href="http://;(url);"(url);: /a?php for ($t = mgd_get_topic($topic); $t; $t = mgd_get_topic($t-up)): $a[]; $a[$i] = "$t-name"; // tror den er rett nå. Skal ikke ha parantes... $i++; endfor; $i = $i - 1; // vi vil ikke ha med nu artikkler i url ? ? for ($j=$i-1;$j-1;--$j): $var; // var er en string. Navnet på topicen $lvar .= "$a[$j]/"; $var = "$a[$j]"; ? a href="http://;(lvar);"(var);: /a ? endfor; ? -Original Message- From: Tarjei Huse [mailto:[EMAIL PROTECTED]] Sent: 17. august 2000 13:47 To: [EMAIL PROTECTED] Subject: [midgard] Copying articles. Hi. Afte a month in development we're soon finished with our new midgard site. There's a few things left (SG for one). I got two questions: 1. Does anyone have some code for the admin site so that I can copy/move an article to another topic? As a result of a missunderstanding I will need to move ca 100 articles around. :-( 2. Does anyone have a smal pice of code for level independent linking? Some of my topics have two to four subtopics and I need to be able to display links to artciles in each level on one page. 3. Also, does anyone have some code for generic "you are here" type of info on a page? Like on cnet.com when you go down into the site you get something like CNET: downloads: pc: linux That's a lot - I'd be greatfull for any advice one theese things. Tarjei Webmaster - Friends of the earth Norway. www.nu.no -- 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]
[midgard] Simple cut and paste script.
Just about a week ago I posted an article concerning the userinterface of midgard and how to deal with "normal" users posting articles from word. Guess what. I found a solution. It's quite simple, itsa a vb script to copy a formated text to the pasteboard for direct pasting into the Midgard content field. There's stil some problems related to the script that I welcome any fixes for (I'm not a programer myself - I'm an enviromentalist gone webdeveloper): * /p - tag starts the formated text. * the script does not take tables. This script only adds a few tags, mainly the b, u, i and p tags needed to for simple txt formating to midgard(I don't want users f*cking up my chosen layout with their own fonts...). Simple instaltion: Just copy the text into the Normal.dot's vb module and add a button (or keyboard shortcut) to the sub. You'll need to make a style named "mellomtittel" (or du a search and replace to use your own) that insets a span class="paratitle" (txt here) /span on the text marked with this word-style. The script uses the following tags: p - in paragraphs. b u i sub span - formating the style mellomtittel the script also transelates norwegian caracters æøå into html. I'll make a homepage for this that we can to on the midgard pages (as I view this a something that makes midgard a lot mot usefull). Any inputs to the script is very velcome. Tarjei endeligmakro.zip -- 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] Abstract html
Hi. Why Isn't it possible to use HTML code in the abstract field? Is it a bug or something wrong with my setup? Tarjei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alexander Bokovoy Sent: 30. juni 2000 16:15 To: [EMAIL PROTECTED] Subject: Re: [midgard] Where can I get an archive of the mailing listS ? Cedric wrote: I want a searchable local copy of all the messages in midgard and midgard-dev. For local copy please contact Emile for his script that works on midgard-project.org for delivering all messages into our archive. Or use marc.theaimsgroup.com/?l=midgard[-dev] for searching. -- Alexander -- 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]
[midgard] Midgard basic site .pdf file mistakes
Hi. There's a syntax error in the "building a site tutorial" .pdf file. In the example template html some of the coding goes like this: !-- BODY -- tr td align="left" valign="top" (content) /td /tr !-- FOOTER -- The truble is that (content) si missing it's (correct syntax being (content). As a newbie this caused me some problems as I'm new to the midgard development model. Anyhow its fixed in the online version, but I could not se who made the pdf version so I thought I'd post it here. BTW: The midgard webpages should have a link page to other midgard sources (tutorials, patches etc.) instead of just posting them randomly in the news section. Thanks for a great program! Tarjei Huse [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]