Polls & Forms
s0ck3t
28 May 2010, 07:52
How do you delete existing polls, and change the forums?
Thanks,
S
Banshee version: 2.0
PHP version: latest
Webserver: Hiawatha 1.7
Hugo Leisink
28 May 2010, 12:23
Polls cannot be deleted. Forum messages can be changed via the forum administration module.
s0ck3t
30 May 2010, 08:17
I would like to change the default forums -- such as these...http://www.s0ck3t.com/forum.
Hugo Leisink
30 May 2010, 08:47
This is not a question.... What do you mean?
s0ck3t
30 May 2010, 23:27
Basically, how to I change the default forum sections, and how can I create new sections (i.e. the default sections are "Lorum ipsum", and "Sed posuere ")?
Thanks,
S
Hugo Leisink
30 May 2010, 23:54
You have to change it in the database. Use, for example, phpMyAdmin to do so. I know that it would be better to have an interface in Banshee for it, but since that's something you would probably do only once, I haven't given it a high priority yet. Maybe later

Remember that Banshee is a framework. A framework offers API's and require programming to add website functionality. The CMS is more like a bonus. If functionality is missing, you have to start programming. If you want a fully clickable website building tool, you have to use something like Joomla.
s0ck3t
31 May 2010, 10:18
Thanks Hugo!
BTW, no way I'm going to Joomla!
R/
S
s0ck3t
31 May 2010, 11:44
Hugo,
When I attempt to edit the forrums via phpmyadmin I get the following error. Any idea what I need to change, or configure to make it work?
-------------------------------
Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unclosed quote @ 40
STR: `
SQL: SELECT * FROM `banshee`.`forums` WHERE \`forums\`.\`id\` = 1;
SQL query:
SELECT * FROM `banshee`.`forums` WHERE \`forums\`.\`id\` = 1;
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\`forums\`.\`id\` = 1' at line 1
-------------------------------
Hugo Leisink
31 May 2010, 12:49
I see some backslashes appeared in the query. I have no idea why that is, I didn't create phpMyAdmin.

Are you using the latest version of phpMyAdmin?
s0ck3t
31 May 2010, 13:03
Yes; latest for Ubuntu is v3.3.2.
I don't receive the same error accessing tables in other databases.

Hugo Leisink
31 May 2010, 13:23
Nevertheless, it's an error in phpMyAdmin. So, it's better to ask at their forum.
s0ck3t
31 May 2010, 13:26
will do; thanks!
s0ck3t
31 May 2010, 14:09
Hugo,
Figured out the problem. It has to do with Hiawatha's SQL Injection protection. If I disable protection (PreventSQLi = no) it works just fine. I guess for the time being I will have to change this setting on the fly when I need to make changes.
Thanks,
Mitch
Hugo Leisink
31 May 2010, 15:48
The Hiawatha manual clearly says that you should only use the PreventSQLi option for non-PHP scripts only, since PHP already has the same kind of protection. If you still enable it (which you did) the protection is done twice. Next time, RTFM!

s0ck3t
31 May 2010, 20:51
Manual? What's that?
Hugo Leisink
31 May 2010, 21:18
Riiight....
Ahcor Werdna
13 August 2011, 13:02
I was wondering how I would go about changing the default page layout for the forums. I know it would be based off code, but where should I look? Thank you.
http://www.projectphaze.us/forum < Those default topic
Hugo Leisink
13 August 2011, 14:52
Forum layout can be found in views/forum.xslt.
Ahcor Werdna
13 August 2011, 19:05
I'm so sorry, I know I didn't ask the right question. I mean how do I remover/modify "this" from the forum section?
"this" > Lorum ipsum (0)
"this" > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer a purus velit, et porttitor diam.
"this" > Sed posuere (0)
"this" > Sed posuere, mauris nec pharetra pulvinar, nunc purus venenatis sapien, bibendum tempor sem.
I saw the forum.xslt file last night, but couldn't find what I was looking for.
Hugo Leisink
13 August 2011, 21:01
The forum posts can be maintained via the forum administration tool. The forum categories (what you see when you visit /forum) cannot yet be maintained via a web interface. You have to manually edit the forum table in the MySQL database via, for example, phpMyAdmin. Future versions of Banshee will have better forum administration tools.
Ahcor Werdna
13 August 2011, 21:16
Oh okay, thank you. Would that be the same for changing the theme also? The only way I would know how to do so, would be to run ./database/setup_database after editing the ../settings/website.conf
Hugo Leisink
13 August 2011, 22:08
Running setup_database for an already installed instance won't work. Changing the theme goes via the set_layout() function in the output class. In every controller, the output object is available as $this->output.
Ahcor Werdna
13 August 2011, 23:12
So running setup_database for a new site, which would create a new database&user. Would work, correct?
I decided to test it out and these are the errors I'm getting.
<quote>XSLTProcessor::importStylesheet(): I/O warning : failed to load external entity "/var/www/pp_us/views/includes/banshee.xslt" in /var/www/pp_us/libraries/xml.php on line 259.
XSLTProcessor::importStylesheet(): compilation error: file /var/www/pp_us/views/system/error.xslt line 3 element include in /var/www/pp_us/libraries/xml.php on line 259.
XSLTProcessor::importStylesheet(): xsl:include : unable to load /var/www/pp_us/views/includes/banshee.xslt in /var/www/pp_us/libraries/xml.php on line 259.
XSLTProcessor::transformToXml(): No stylesheet associated to this object in /var/www/pp_us/libraries/xml.php on line 265.
XSL Transformation error
Ahcor Werdna
13 August 2011, 23:19
I'm sure that I am doing something wrong, but just to make sure. I am wanting to us "layout_unembellished"
I can't POST/show you my banshee.xslt file, it tells me "Message seen as Spam" but it does include this.
"functions.xslt" / >
layout_compromise.xslt" />
layout_unembellished.xslt" />
="layout_compromise" />
="layout_unembellished" />
I apologize about the double post.
Hugo Leisink
14 August 2011, 11:28
About your first post: I have no idea what you did. But those errors shouldn't appear if you follow the installation documentation.
About your second post: the banshee.xslt is oke. In the controller of a module you want to layout of, add the following line to the execute() function:
$this->output->set_layout("layout_unembellished");
Ahcor Werdna
15 August 2011, 05:41
This is the only installation doc i see for themes. "To install the themes, download the theme package and unzip it in the root directory of a Banshee website. This will overwrite the file views/includes/banshee.xslt."
Thank you for clearing that up for me.
Ahcor Werdna
14 October 2011, 07:35
Thank you, I now understand how to apply a new theme.
Ahcor Werdna
14 October 2011, 07:44
http://www.pd0s.net/weblog
I have applied a new theme and now I have run into another issue. By visiting my site you can see what I mean. How and what would I edit, to fix the layout? So there isn't an overlap on the left and right side bars?
Hugo Leisink
14 October 2011, 10:17
There is a conflict in the tag classes. What you should do is this:
1) edit views/includes/layout_condition.xslt and change class="content" to class="page" on line 51.
2) edit public/css/includes/layout_condition.css and change div.content to div.page on line128.
I've fixed the themes.tar.gz. You could also re-download it and unpack it again.