41
BradM
Re: Does anyone have a copy of Glossaire on XOOPS 2?
  • 2003/12/30 19:54

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Quote:
just to let you know a while back I started the process of transforming the Glossaire module into a Smarty-templated one, that is, to bring the module up to date and in english.


That's good to hear! I've hacked away at my copy to make modifying it a little easier. I'm not to the point of adding templates, but I created a few new functions in functions.php (namely there is now only one place where the table for the definition is built, so you don't have to edit 3 or 4 files each time you want to make a change).

I'm not sure if you guys are looking for suggestions for the next version, but I have a few which I have added that makes it more encyclopedia-style.

* option to add an associated image to the definition
* option to add related terms (all of which are automatically hyperlinked to their own definition)
* for the 10 most recent, trim down the definition and add a "more" link to the full definition

Finally, one that I would personally find useful is that, prior to displaying a definition, the text is scanned for all terms that are already in the database. If any existing terms appear in the current definition, automatically hyperlink them to their own definition (basically what you see at the Wikipedia).


Brad




42
BradM
Re: Album in XcGallery
  • 2003/12/29 19:47

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


First you have to create a category within the module's admin area. Next, you have to go to the gallery itself, then choose "admin mode" (if it is not already in that mode). You'll then see two buttons, "create/order my albums" and "modify my albums".

Choose the create button, then follow the form -- it's pretty straight forward. Once the album has been created, you can then use the admin area to batch-add pictures into it.


Brad



43
BradM
Re: auto-replace block title with graphic
  • 2003/12/29 4:31

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Here's a quick example of a guest-only block that lists the benefits of membership. The "Join Today!" block title has been replaced by the "join_today.gif" graphic file.

Resized Image



Brad



44
BradM
Re: Success!!
  • 2003/12/29 3:45

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


That's the fix I posted over at Koudanshi's site.

I'm glad to hear that it's working, I had thought my errors were due to IPB not being updated. Now I realize that it was due to the code I had hacked into header.php (I have since fixed my code).

What I'm trying to do now is move the content of the whos_online block to somewhere up in the header. I've gotten it to work fine as long as I am displaying the whos_online block (which is kind of redundant). When I hide the block the info within header.php doesn't update -- so I'm obviously missing something.


Brad



45
BradM
auto-replace block title with graphic
  • 2003/12/29 3:27

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


I've just been working on this hack tonight, and it seems to be working fine, so I thought I'd pass it along for others to try (and hopefully make it better!).

This hack, as I have it implemented, automatically replaces all of the titles in the center/center blocks with a corresponding graphic. If the graphic does not exist, it just prints out the block title in text format (ie. no broken image to worry about). All this really means is you can add fancy graphic titles to all of your center/center blocks without too much hassle.

For this to work, you need to modify header.php and theme_blockcenter_c.html.

header.php
Around line 185 you'll see this code:
case XOOPS_CENTERBLOCK_CENTER:

A few lines down from it, you'll see this:
$xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));


Just before the $xoopsTpl line, add this code:
// title hack
$imgttl $block_arr[$i]->getVar('title');
// replace spaces with underscores
$imgttl str_replace(" ""_"$imgttl);
// remove non-alphanumeric characters
$imgttl preg_replace("(W)"""$imgttl);
// convert to lower case
$imgttl mb_convert_case($imgttlMB_CASE_LOWER"UTF-8");
// append image format
$imgttl $imgttl.".gif";
// build paths
$imgpath XOOPS_ROOT_PATH.'/images/'.$imgttl;
$imgurl XOOPS_URL.'/images/'.$imgttl;
// check for file
if (file_exists($imgpath)) {
    
$ttl_img $imgurl;
}
else { 
$ttl_img ""; }


Next, change the $xoopsTpl line to this:
$xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent'ttl_img' => $ttl_img));


theme_blockcenter_c.html
Change this code:
<{$block.title}>

To this:
<{if $block.ttl_img}>
<
img src="<{$block.ttl_img}>" alt="<{$block.title}>" title="<{$block.title}>">
<{else}>
<{
$block.title}>
<{/if}>


After making these changes, you shouldn't see any difference in your center/center blocks unless you upload graphics into your XOOPS "/images" folder.

Make sure you change $imgttl = $imgttl.".gif"; to match the extension of the images you will be uploading (eg: .png or .jpg).

The graphic names should all be lower case, and have spaces replaced with underscores. Examples:

Block Title: What's New
Corresponding Graphic: whats_new.gif

Block Title: Recent Discussions
Corresponding Graphic: recent_discussions.gif

Block Title: News!!!!
Corresponding Graphic: news.gif

Block Title: tHe gNU PrOjeCT
Corresponding Graphic: the_gnu_project.gif


Brad



46
BradM
Re: Req: random quote in replace of banners?
  • 2003/12/29 0:51

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


I've since discovered that using the $result variable here could mess up other modules (such as the weBlog). So you should use a unique variable, such as $thequote instead of $result.


Brad



47
BradM
Success!!
  • 2003/12/28 20:05

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Well I grabbed the latest-and-greatest archive of 2.0.5.1 and reuploaded the following folders: modules/system, kernel, class, include, and all the files in the root -- then updated the system module. That seemed to do the trick!

Of course, now my IPB module isn't quite working right, but at least all the data is still there. I just have to be patient and wait for an update for it.

Thanks for all the help.

Brad



48
BradM
Re: Who's Online no longer working
  • 2003/12/28 19:12

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Thanks for the suggestions! I've tried them all and still show 0 online. I think I might be messed up somewhere due to the fact that I added the IPB module (it actually isn't the problem, it was working fine when I first installed -- but I've since upgraded Xoops, plus been hacking away at some files, and I probably messed up something in the process).

So I think the next step is to remove that module, reupload the XOOPS core files, update the system module, and see what happens!

EDIT> geez, I'd hate to lose all the work I've done integrating the IPB module so far. So I'm going to avoid uninstalling the module for now, and try to figure out what went wrong. I just checked the xoops_online table, and it's completely empty, the script no longer seems to be writing to it at all.


Brad



49
BradM
Headlines and Amazon XML
  • 2003/12/28 10:22

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Has anyone had success with using the Headlines module and Amazon's (new) Associate XML generator?

I'm completely at a loss with this whole XML thing, but "Headlines" doesn't parse the XML that is generated by Amazon. It seems as though it's just an XML document, and not a true RSS doc.

Are there any modules out there that can parse an XML document and display it within Xoops?


Brad





50
BradM
Re: Cannot using Xtremguestbook
  • 2003/12/28 9:54

  • BradM

  • Just popping in

  • Posts: 78

  • Since: 2003/8/14


Hmm maybe it's an upgrade thing. I did a fresh install of the module, and so far haven't had any trouble. Maybe you could save the tables, do a fresh install, and then reimport them somehow?


Brad




TopTop
« 1 2 3 4 (5) 6 7 8 »



Login

Who's Online

172 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 172


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits