I'm glad you figured it out - ochiba shouldn't care one way or the other whether it's being called www.mysite.com or just mysite.com. Could you perhaps describe what the issue was and how you resolved for other people who may run into the same problem?

27

(1 replies, posted in Discuss)

I'm afraid there is no way to embed it into another framework such as a forum currently. One option is alter the ochiba site template to mirror that of the your forum, but that would still not be a real integration.

28

(2 replies, posted in Support)

Hmm, there's quite a few different fixes and hacks in that thread so I don't know which one you've tried.

The one I *think* should work for you is this: http://ochiba.x-maru.org/support/viewto … pid=19#p19

That's post #12 in the thread. Also read #13 and #14, which contains one additional modification.

If you've tried that, and something is still wrong, let me know.

29

(11 replies, posted in Support)

I checked and they are identical to the files as in ochiba-1.2.

I'm afraid I have no explanation and without being able to work on the system, I can't offer anything in the way of useful suggestions.

The nature of the problem is very strange as  I mentioned and has never been reported so I have to put it down to some strange quirks in the PHP/Apache environment on your host. If you have an alternate host available to you, give that a try.

Beyond that, though, I'm afraid there's nothing more I can tell you at this point.

30

(11 replies, posted in Support)

Hmm, well if that's not a file you edited then I'm completely at a loss. The only other place a change could possible cause weird effect such as this is in includes/images.php - is this a file that you edited? If so, try using the default to see how the {id} markers in the template work out if the distributed version is used.

If you haven't changed this file, then I'm afraid I'm completely stumped.

31

(11 replies, posted in Support)

Your database looks fine, and your image board *mostly* looks fine. I still don't understand why the ID is working on most parts of the page, but not on others.

This is what image.tmpl should look like.

[img]http://ochiba.x-maru.org/imgboard/view/000154/image.tmpl.png[/img]

I've highlighted the places where ID is filled in. For you, the 1st, 5th, and 6th {id} are working, but 2nd, 3rd, and 4th are not. Since it's all the same template, they should all work, or they should all not work.

Can you confirm all of the IDs in your image.tmpl are the same as shown, and if you haven't already, start over with a brand new image.tmpl just as a starting point.

32

(11 replies, posted in Support)

It's in the database, the "images" table, column named "id". The thing is, your basic page already shows you the id, so that part is working - each post has the ">>123" designation on your page. Somehow it's not getting plugged into the reply link's URL though - I'm guessing the issue should be fixed in the template...

33

(11 replies, posted in Support)

Chymæra wrote:

First off, how can I make the system accept posts without a name?

I take it you mean "anonymous" posting? A couple of different options are covered here: http://ochiba.x-maru.org/support/viewtopic.php?id=32 - it also covers disabling the javascript alert/warning.

Chymæra wrote:

Secondly, I can't seem to be able to post without a tripcode (neither on my nor on the "sample" ochiba imageboard)

I advise against posting without a tripcode - it eliminates the ability to delete your own posts. If you must, you can give it the same treatment as above for the name.

Chymæra wrote:

Secondly, for some reason or another, my imageboard at http://pinkweb.org/p won't show any picture preview... also, worrying :P

This looks to me like a problem with permissions on your thumbs and img directories. Make sure they are set to be writable by the web server processing. From a shell, you could do

chmod 770 img thumbs

if your directories are in the web server group, or

chmod 777 img thumbs

as a last resort.

Chymæra wrote:

Lastly, and probably my greatest problem - I can't seem to be able to reply to any posts, no matter what I do, my replies get bunched in the respective sub-board. Also, I would like to get rid of the entire "category" interface in the post window - how would I do that?

Hmm, your ochiba install isn't working quite properly - have you made a lot of changes to it? First of all, I see that the reply links do not include the parent post/thread ID number. If you hold your mouse over a reply link and look at the URL in the status bar, it looks like

http://pinkweb.org/post?id=

with the ID missing. There should be a number after the "id=" part. You can look at the test boards here and see what that should look like.

Secondly, your posting window is not normal either- yours has the site menu for some reason, and does not automatically select the category depending on what category you were looking at when you clicked the "post" link. Again, you can go check out the test board and see that the posting window should not have a site menu, and should automatically select the category based on where you are when you clicked it. This addresses your 2nd item - if this feature was working, you could eliminate the category choices.

Anyway, my suspicion is that modification of the ochiba code has led to the loss of these normal functions, so I would advise rolling back your edits or re-installing ochiba and being more methodical about making changes so that you don't lose these features.

34

(1 replies, posted in Support)

Yup, you just comma separate them in the conf file, such as:

define("MODERATORS","TRIPCODE1,TRIPCODE2,TRIPCODE3,TRIPCODE4");

etc. Note that these are the hashed form of the tripcode, but you probably already knew that.

Hmm, that's pretty clean - nicely done. The next version of ochiba I'm working on is going to use a different template system (Smarty) so the implementation will be different but your code above has given me some ideas. Thanks!

36

(2 replies, posted in Support)

Excellent, I love it when problems resolve themselves ;)

37

(3 replies, posted in Support)

Just a warning: this is a bit uglier than I'd like:

Out of the box, ochiba will escape (htmlspecialchars) the description of a category, but if you "disable" that, you can use any HTML you desire. Since most likely it will be just you editing this, it should be safe from attack as long as you know what you're doing (ie basic HTML).

To disable the escaping, you would make the following change to includes/images.php:

--- includes/images.php    3 Feb 2006 02:37:38 -0000    1.48
+++ includes/images.php    14 Jul 2009 01:39:23 -0000
@@ -361,7 +361,7 @@
 if($category == "Stats") {
     $vars["category"] = "Top " . LIMIT . " Most Viewed Images";
 }
-$vars["description"] = $category == "Stats" ? "" : htmlspecialchars(stripslashes($categories[0]["description"]));
+$vars["description"] = $category == "Stats" ? "" : stripslashes($categories[0]["description"]);
 if (!is_numeric($category) && count($images)>=1) {
     $vars["pager_top"] = $pager;
     $vars["pager_bottom"] = $pager;

In other words, on line 364, remove the htmlspecialchars() call.

The other place the description appears is as a tooltip (title attribute) in the menu of categories. Since you are using these descriptions for more than just "my cat pics", you should probably just disable those. In includes/functions.php:

--- includes/functions.php    30 Aug 2005 08:06:08 -0000    1.42
+++ includes/functions.php    14 Jul 2009 01:41:41 -0000
@@ -99,10 +99,9 @@
     $result = $db->query($sql);
     $menu = "";
     while($row = $result->fetchRow()) {
-        $menu .= sprintf('<a href="%s/%s" title="%s">%s</a>%s',
+        $menu .= sprintf('<a href="%s/%s">%s</a>%s',
                             ROOT,
                             $row["abbr"],
-                            $row["description"],
                             $row["category"],
                             "\n");
     }

In other words, remove the references that display the description.

After those two changes, you should be able to edit the description using HTML. Hope this helps.

38

(3 replies, posted in Support)

I'm afraid there isn't a "sticky" feature currently in ochiba, but it's on my to-do list for ochiba v2.

One way you can perhaps hack this in is to use the "description" field for your category - of course, this doesn't give you the same look/feel/flexibility of a regular post, but if it's just an announcement you'd like to put at the top, this might work for you.

39

(11 replies, posted in Support)

Boy, I'm stumped. The idea is this: when you request http://music.mcgill.ca/~chris/ochiba/admin, the rewriterule is supposed to recognize that there is no file that matches that URL, so instead rewrites the request to http://music.mcgill.ca/~chris/ochiba/index.php/admin, thereby giving the request to index.php with "/admin" as an argument. In the latter attempt, it would rewrite it as http://music.mcgill.ca/~chris/ochiba/in … est=admin. Either way, index.php would get run, detect what was being asked and act accordingly.

It doesn't get that far though. I have servers running the same OS as you, and they're not having this kind of issue with rewrite rule, and I don't mess with any configuration pertaining to mod_rewrite, so I'm left to conclude your sysadmins do. Perhaps you can point them at this discussion and something will make sense to them why this isn't working as intended.

40

(11 replies, posted in Support)

Wow, it just amazes me the different mod_rewrite configurations out there...

That error/path is also strange to me as well as that's a filesystem path and I can't imagine how it's showing up in a URL request.

I'd like to have you try a slightly different approach, since I'm at a loss here. Try this line instead in .htaccess:

RewriteRule ^(.*)$ index.php?request=$1 [L,QSA]

And then in index.php:

< $path_parts = explode("/",$_SERVER["PATH_INFO"]);
< $path = $path_parts[1];
---
> $path = $_GET['request']; die($path);

and let me know what you see when you access /admin

41

(11 replies, posted in Support)

Yep, your hunch is correct, URLs such as /admin, etc don't actually map to the file system but is parsed by the index.php to decide what is being requested. This uses Apache's rewrite technique but you've run into what appears to be a common issue.

Anyway, the change I would point you to is in the thread you seem to have discovered (the issue with the tilde should be fixed and a non-issue). In particular these two changes are where I'd start,

.htaccess

< RewriteRule ^(.*)$ index.php/$1 [L,QSA]
---
> RewriteRule ^(.*)$ index.php?$1/ [L,QSA]

index.php

< $path_parts = explode("/",$_SERVER["PATH_INFO"]);
---
> $path_parts = explode("/", "/" . $_SERVER["argv"][0]);
> array_pop($path_parts);

If you haven't already tried that, give it a shot and let me know how it goes. If that doesn't work, can you check with your sysadmin and confirm that mod_rewrite is available to you?

42

(11 replies, posted in Support)

Typically in a hosted situation, a database account is another account and somewhat separate from your system account. In other words, having one doesn't mean you have another, nor does having both mean they are the same username/password combination. That's a detail you'll have to get from your hoster/sysadmin: your mysql username and password. Usually, you'll also need the mysql database name because while it's possible, few hosters let users create their own databases.

That triplet of information should be what you need to get going. In most mysql situations I've seen, they've gone the "localhost" route for connections,  so you would set up a DB string in the form like this:

define("DB","mysql://user:pass@localhost/dbname");

(substituting user/pass/dbname)

In rare circumstances, it might be the domain socket form so if that's the case, then you can try the later.

Before you even try with ochiba, however, you should test your database credentials outside of ochiba by trying the following from a shell:

mysql -p -u mysqlusername mysqldatabasename

It should prompt you for your mysql password and if successful, you should see a mysql prompt.

Give that a try and let me know how it goes.

43

(6 replies, posted in Support)

Hmm, actually it looks like you're in luck as your host apparently has Postgres support, so ochiba will function the same. Unlike sqlite you need a database created for you, a database username, and a database password, and only your support/sysadmin can provide those, but once you have all three of those, you can plug them into your connect string - examples of the postgres form are in conf.php.

44

(6 replies, posted in Support)

Oh, it sounds like your host does not have the sqlite extension, or may be using a newer version of PHP (specifically version 5) which does sqlite differently. Can you set up a script that just does "phpversion()" and then let me know the version it is and anything that mentions "sqlite" ?

45

(6 replies, posted in Support)

Could you try the little test/debug script in post#6  of that thread? It'll give a more informative error message (obviously, changing the connect string to yours).

This means your web host has locked down PHP so that it cannot access the /usr/bin directory, where programs are commonly found. It may be that they put external programs for PHP to use in some other directory, in which case you need to change conf.php to point to the right path for convert; or it may be that they just won't allow PHP to run external programs, in which case ochiba won't work properly for you on that web host.

Contact your web host with the error message as you quoted above - they will be able to provide a definitive answer.

47

(2 replies, posted in Support)

Looks like your PEAR.php file is not in the expected places. This really is something that should probably be addressed at the hoster level (specifically, the include_path should point to a directory that contains PEAR.php) so you may want to contact them and ask where it might be. Another thing you can do is find it yourself. If you have shell access, the command "locate PEAR.php" might turn up the exact path; from there you have to tweak the scripts in question to that exact path.

The final option is to get the PEAR.php file directly from http://pear.php.net and upload it manually to the ochiba directory, as you appear to have done for the DB.php file.

48

(2 replies, posted in Support)

The posting form already does the detection of which category it was called from, actually. It looks at the referer (sic) field and then uses that to automatically select that category.

Given that, I think it would be fairly trivial to do what you describe. In includes/posting.php, at line 370 is a curly brace that closes an if{} block:

   368                if ($row["abbr"] == $referrer) {
   369                    $row["checked"] = 'checked="true"';
   370                }
   371                $tmpl->setCurrentBlock("category");
   372                $tmpl->setVariable(array(
   373                    "category_name"     => FEATURE_MULTIPLE_CATEGORY ? "categories[]" : "categories",
   374                    "category_type"     => FEATURE_MULTIPLE_CATEGORY ? "checkbox" : "radio",
   375                    "category_value"    => $row["abbr"],
   376                    "checked"           => $row["checked"],
   377                    "label"             => $row["category"],
   378                ));
   379                $tmpl->parseCurrentBlock();

Move this line to *after* what is line 379:

   368                if ($row["abbr"] == $referrer) {
   369                    $row["checked"] = 'checked="true"';
   370                    $tmpl->setCurrentBlock("category");
   371                    $tmpl->setVariable(array(
   372                        "category_name"     => FEATURE_MULTIPLE_CATEGORY ? "categories[]" : "categories",
   373                        "category_type"     => FEATURE_MULTIPLE_CATEGORY ? "checkbox" : "radio",
   374                        "category_value"    => $row["abbr"],
   375                        "checked"           => $row["checked"],
   376                        "label"             => $row["category"],
   377                    ));
   378                    $tmpl->parseCurrentBlock();
   379                }

This will make *only* the category the post form was called from appear, and be checked.

That's the basic change. It will fail if the posting form was called from a non-category page (ie, the home, admin, stats, etc pages), so you'll have to make other changes that depend on how you want to handle it. You can also make the category selection not appear at all (the above makes only the relevant one appear, and it is selected) by modifying templates/post.tmpl at line 47 from:

        <input type="{category_type}" name="{category_name}" value="{category_value}" {checked} /> {label}

to

        <input type="{category_type}" name="{category_name}" value="{category_value}" {checked} style="display:none"/>

Or something along those lines.

The other aspect of this is the "hidden" categories appearing in the default menu - you will have to change that to a static list that you manage yourself (ie if you add a new category, you have to add it to the menu manually). This is in templates/site.tmpl, you want to remove the line that says {CATEGORIES} and put in the HTML for your specific list of categories in its place.

I hope this is to your point and enough to get you going!

49

(4 replies, posted in Support)

Oh, I see, I thought you meant in the posting form. This is the tripcode hash, you can get rid of it by editing templates/image.tmpl. Look for and delete these two lines:

<em class="tripcode"><{tripcode}></em>

and

<em class="tripcode"><{comment_tripcode}></em>

Should be lines 45 and 60.

50

(4 replies, posted in Support)

Hmm, I'm not sure which field you're referring to. In the default, there is name field followed by tripcode field. The only random thing I can see is the CAPTCHA, but you can disable that if you desire. Can you describe in more detail, or maybe post a screenshot somewhere?