I enabled the module and inserted the tag [block:=]

I've tried all sorts of insertions but nothing works but apprently I'm missing one.

Can someone give me a clue how you would use this module to display event module with delta tag 1???

Comments

pobster’s picture

Unless I've misunderstood what you're getting at... You just simply enable "List of upcoming events." in admin/blocks *that's* the event modules delta tag 1 block... I have no idea of what you're getting at with that [block:=] thing... That's just plain weird...

Pobster
edit: Ohhhhh right, insert_block is a module... Man you were vague... Try [block:event=1] I just read the instructions... http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/insert_bloc...

--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------

underpressure’s picture

Thats the thing I've tried all sorts of ways of writing the tag including the one you used.

When I opened my front.tpl.php file in dreamweaver the tag was exactly the way you have it. All I see on the page is: [block:event=1] it's not being converted, Events block is enable and not set to show on any custom page.

And yes I double checked to make sure the module enables (like 6000 times) someone please help me I'm loosing my sanity trying to figure out what I've done wrong.

nevets’s picture

Visit 'Administer' -> 'Site configuration' -> 'Input formats'. For each input format you want to allow the insert block filter, click 'configure'. Under 'filters' you will see 'insert block filter', check to allow the filter

underpressure’s picture

I thought that might have been the problem. God knows how many times it crossed my mind.

The read me for the module is too vague. I even contacted the maintainer yesterday and no word.

Thats for filer when you placing the block in a node I'm embedding into the .tpl.php file

nevets’s picture

The module provides a filter that needs to be part of content. No tpl.php is run through the filter system so including there will not work as expected. You are much better off adding a new region where you want the block(s) and adding the block the region in the normal way. See Regions in PHPTemplate for more on how to add regions.

michelle’s picture

That module is a filter module. It's not going to work in your .tpl.php file. You need PHP there.

Michelle

--------------------------------------
My site: http://shellmultimedia.com

underpressure’s picture

I really did not need to hear that, Sigh!!!! <?php print language('dirty_words'); ?>

nevets’s picture

Visit 'Administer' -> 'Site configuration' -> 'Input formats'. For each input format you want to allow the insert block filter, click 'configure'. Under 'filters' you will see 'insert block filter', check to allow the filter

cog.rusty’s picture

I don't have the insert_block module installed currently, but I didn't understand what happens when you insert [block:event=1]? Does the tag appear unchanged?

If so, check your current input format (is it Filtered HTML?) in /admin/settings/filters. See if a filter to render those tags is enabled.

michelle’s picture

You seem kinda desperate so I went looking in the phptemplate engine code. I haven't tested it, but this might do it? Haven't tested... Newborn screaming on my lap so this is as much as I can do.

$block = module_invoke('nice_menus', 'block', 'view', 1);
print theme_block($block)

Of course, replace the actual block you want in the invoking.

Michelle

--------------------------------------
My site: http://shellmultimedia.com

michelle’s picture

Just curious... You responded to my other post on this thread a couple hours ago but not this one. Curious if it worked for you.

Michelle

--------------------------------------
My site: http://shellmultimedia.com

underpressure’s picture

Before I started this thread I came across this version

 <?php $block = module_invoke('block', 'block', 'view', 25); ?>
<h2><?php print $block['subject']; ?></h2>
<?php print $block['content']; ?>

the problem with this code is, It doesn't have all the css/div tags as standard blocks do. Once I double check the tags I'll be back for a solution.

I think one difference with your versio0n and this one is, this one gives you the name of the block as well.

underpressure’s picture

I'm posting and get back to thread and don't see my post until ctrl+refresh. Hardcore caching I guess.

cog.rusty’s picture

Absolutely hardcore. Different MySQL servers for reading and writing recently installed, which need some more tinkering.

underpressure’s picture

A big thank you to the people who lose sleep to keep Drupal running so those of us who are hopeless can learn a thing or two.

underpressure’s picture

Using firebug this is a copy of the drupal generated block in the sidebar and the block generated by the embed code I showed you.

What I would like is the css tags for the embed version to match those of the one created by Drupal.

Original Block

<div id="block-article-0" class="block block-article">
<h2 class="title">Latest Articles</h2>
<div class="content">
<div class="item-list">
<ul>
<li>
<a href="/login_errors">Unable to log into account</a>
</li>
<li>
<a href="/node/847">Rockmania Photos posted</a>
</li>
<li>
<a href="/rockmania_photos">Rockmania Photos</a>
</li>
<li>
<a href="/node/709">Scheduled down time</a>
</li>
<li>
<a href="/node/704">Rock Revolution 2 photos posted.</a>
</li>
</ul>
</div>

Embed version

<td>
<h2>Latest Articles</h2>
<div class="item-list">
<ul>
<li>
<a href="/login_errors">Unable to log into account</a>
</li>
<li>
<a href="/node/847">Rockmania Photos posted</a>
</li>
<li>
<a href="/rockmania_photos">Rockmania Photos</a>
</li>
<li>
<a href="/node/709">Scheduled down time</a>
</li>
<li>
<a href="/node/704">Rock Revolution 2 photos posted.</a>
</li>
</ul>
</div>
<div class="more-link">
<a title="Read more articles." href="/article">more</a>
</div>
</td>
michelle’s picture

That code is just printing the title and contents of the block. The code I gave you runs it through the theme function which gives you all the divs as you can see here: http://api.drupal.org/?q=api/function/theme_block/5

Michelle

--------------------------------------
My site: http://shellmultimedia.com

underpressure’s picture

Yeah ummmm...........I knew that, I was just ....testing you yeah! thats it!!!

Thank you so much. eh one last thing. I've found like 20 different was to add (and not add) custom style sheets for custom nodes. Can you please tell me the best way to add a custom style sheet to a custom node.tpl.php???

Thank you.

pobster’s picture

I wrote a small module which works the same (kind of) to my logotool module. You set which nodes use which stylesheets and the module imports them automagically. You can even set random stylesheets, time 'rotating' stylesheets and you can use wildcards to match the nodes as well. Give me a shout if you're interested and I'll dig it out. Best thing is that it requires NO changes to any template files at all.

Pobster

--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------

underpressure’s picture

I think i'm getting ahead of myself. I should be asking what is the best way before asking how to do it the way I think is best.

I'm not comfortable using new modules until many have tried it and work out any bugs or security issues IT MAY have.

I think it would be a welcome for the community. Hope to see it soon in the download section soon.

pobster’s picture

I'm afraid I can't release it to the community as although it's based on my own logotool module, I coded it for a company and so technically they own it... You're kind of protected by security exploits still though as obviously anything which effects logotool will effect this module (it's identical structurally) and logotool has LOTS of people using it!

Pobster

--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------