We're trying to develop a community website running drupal here in balata refugee camp, palestine. http://balatacampnet.nj-web-0408.uplinkearth.com/drupal/ the old static page can be seen at www.balatacamp.net
i'm having some trouble implementing the bidi module that alaa developed. I copied the bidi.module file into the module directory and enabled it from administer --> modules. but it doesn't seem to be taking effect. am i just stupid and forgetting to enable the bidi somewhere else?
and if ppl are busy just ignore this, but does anybody know if the /files/ folder and its subfolders need specific permissions for the 'upload' and 'image' modules to work? will 760 do the trick? i'm having some problems getting either of those modules to work, and haven't worked out what yet.
Thank you Alaa
Hello Alla, First of all, Thank you for your efforts and specially for the bidi.module, it make life much easier. And Thank you for helping me installing it in my site. Now, every thing works as 'advertised' :-) lines are automatically aligned to the right direction :-) but when I try to make a new post, be it a blog, story or a comment, I keep getting a strange error repeated three time on top of the page:
warning: Missing argument 2 for bidi_filter_tips() in ../modules/bidi.module on line 33
This is line 33 from the bidi.module:
function bidi_filter_tips($delta, $format, $long = false) {
Strange is, the message doesn't appear when commenting anonymously
Good Point
Very logical point. I checked administer/settings and it has nothing related to input formats or bidi. I also checked administer/input formats, and bidi is added to all Filtered HTML, PHP code and Full HTML, and set as the last input filter in all of them. Filtered HTML is the default as in set to be allowed for anon, auth and Salman. Other 2 are only allowed for Salman. Salman is a special role derived from auth users with some admistrative duties. The error occures whenever I try to post anything; a page, blog, story as Salman or administerator. It doesn't occur when I try to post a poll.
edit: I was checking around and I now everythings seems ok. Only administerator gets that error when trying to post.
image module problem
I faced exactly the same problem with image upload. I solved it through: administer>settings scroll down the page to "File System Settings" Under "download method", click "Private - files are transferred by Drupal." radio button. Although this is not recommended (as I read somewhere), it made it work. I could not have file upload work though.
never noticed
I never noticed the second question, remember one question per thread.
files/ needs to be writeable by the apache process, so either 770 or 777 depending on the group ownership of the dir.
cheers,
Alaa
http://www.manalaa.net "context is over-rated. who are you anyway?"
because files/ is where
because files/ is where uploaded content goes, pache needs to be able to write there.
cheers,
Alaa
http://www.manalaa.net "context is over-rated. who are you anyway?"

its a filter module
Bidi is what we call a filter module.
unfortunatly this is not covered properly int he drupal docs, filter modules allow you to create different "input formats" where the text you input in a node or comment textarea is transformed before rendering the node.
for instance Wiki filter module is what allows us to have a wiki input format that recognizes special markup like ! for headings (more info about wiki module)
bidi is a filter module that scans each html block and computes its line direction then adds a class="right2left" or class="left2right" attribute.
in order to use bidi you must add it in your input formats (administer->input formats then choose configure for each input format), and bidi would better be the last filter applied.
finally your theme style.css file should contain something like
.right2left { direction: rtl;} .left2right { direction: ltr;}I also suggest you use the html correcter filter module and put it before bidi in the list of filters for each input format, bidi assumes correct nesting of html tags and since its a dirty hack there is no guarantee it will cope well with faulty input.
did this make any sense?
please in the future use seperate posts for each questions.
the files directory should be writable by the user running the apache webserver (might be apache, http-data, nobody, daemon, etc depending on distro).
so it needs to be at least 770, but if you can't chgrp the dir to the apache group then you might have to use 777 instead.
on my servers I make sure the directories group is apache and use 2770 the setgid bit ensures that directories created inside files/ will retain the same permission and ownership.
cheers,
Alaa
http://www.manalaa.net "i`m feeling for the 2nd time like alice in wonderland reading el wafd"