I posted this over on the zafenio site forums, but they seem fairly dead, so I'm hoping for better luck here and apologize for the cross-posting. I also recognize this problem is related to this post discussing W3C compliancy where multi-block is recognized as being a very old script.
Multi-block does not seem to be working in the latest zikula. The existing multi-block on my index page does not appear, and when I try to create a new block, PNphpBB2/Multi-block does not appear as an option.
I've attempted to follow the zikula wiki entry on block creation, which appears to have some different language/procedures than that in the latest release of the multiblock.php file. I'm not a coder, however, and haven't been successful in modifying the file. Have I diagnosed this problem correctly or is there another explanation for why my multi-block doesn't work?
I'm running zikula 1.2.2 and PNphpBB2 1.4i patch4rc2, and some manner of displaying the latest forum posts on my index page is critical!
Thank you.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
PNphpBB2 Multi-block in Zikula 1.2.2
-
- Rank: Registered User
- Registered: Mar 16, 2010
- Last visit: Mar 19, 2010
- Posts: 2
-
- Rank: Team Member
- Registered: May 03, 2004
- Last visit: May 31, 2010
- Posts: 511
I can confirm this problem, latest version of Zikula to use the Multiblock is 1.1.2. Unfortunately this is very old code which never validated correctly. We would need a complete re-write for > 1.2.0, and there is no developer ATM interested in doing it. So, sorry - no Multiblock in PNphpBB2 if you use Zikula > 1.1.2.
Greetings,
Chris
--
an operating system must operate
development is life
my repo -
- Rank: Team Member
- Registered: Feb 27, 2005
- Last visit: Apr 12, 2010
- Posts: 665
I did not realize that the block cannot even be created anymore in Zikula 1.2+. Slam, can you confirm this?
Rewriting that beast to follow W3 standards is one thing, but I thought at least the back-end worked correctly.
Since I use PNphpBB2 on two of my sites (one of them is 1.1.2, waiting to upgrade to 1.2), I'll try and see if I can come up with something...
--
-- Teb
-- Dutch Zikula Community
Support questions in a Personal Message will be ignored. Use the forums at all times! -
- Rank: Team Member
- Registered: May 03, 2004
- Last visit: May 31, 2010
- Posts: 511
Yes, confirmed. I also started to hack the block to get it working "somehow" again in 1.2.2, but run out of time.
Greetings,
Chris
--
an operating system must operate
development is life
my repo -
- Rank: Registered User
- Registered: Mar 16, 2010
- Last visit: Mar 19, 2010
- Posts: 2
As an interim solution, I managed to adapt a recent posts script for phpbb2, upload it to my root as a PHP file, and use the Zikula Simple File Include block to get the latest forum posts on my homepage. Thought I'd share.
Change the dbuser, dbpasswd, and dbname places with your DB info. And you may need to change the first part of table_prefix from 'nuke' to whatever your prefix is (i.e. PN, zk, etc.). Change topicnumber to the number of recent posts you want displayed.
Edit...for some reason, the < br> tags in the code below are being parsed and not displayed. To get them to show I've added a /, so before use, convert the code < /br> to < br>.
Code
<?php
// How Many Topics you want to display?
$topicnumber = 5;
// Change this to your phpBB path
$urlPath = "/index.php?name=PNphpBB2";
// Database Configuration (Where your phpBB config.php file is located)
$dbhost = 'localhost';
$dbuser = 'yourdbusername';
$dbpasswd = 'yourdbpassword';
$dbname = 'yourdbname';
$table_prefix = "nuke_phpbb_";
$table_topics = $table_prefix."topics";
$table_forums = $table_prefix."forums";
$table_posts = $table_prefix."posts";
$table_users = $table_prefix."users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.forum_id != 4 AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");
print "<table cellpadding='0' cellSpacing='0' width='100%'>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr valign='top'><td style='border-bottom: 1px dotted #CCCCCC'><a href=\"$urlPath&file=viewtopic&t=$row[topic_id]\">" .
$row["topic_title"] .
"</a></br><small> by: " .
$row["username"] .
"</br>" .
date('F j, Y, g:i a', $row["post_time"]) .
"</td></tr></small>";
}
print "</table><ul><li><a href=\"/index.php?name=PNphpBB2\">All Discussion Forums</a></li></ul>";
?>
edited by: drgop, datetimebrief
- Moderated by:
- Support
