Sure, but I am also trying to learn how to work with modules. And using &quot;nodeasblock&quot; + views to display the block seems kinda excessive, from a code-simplicity perspective. Note that the new nodeasblock allows my content admin to create a node AND place it in a predefined allowable region all on their own from the node create/edit form; which is very handy. If I then switch over to using views it defeats the point of the UX for the content-admin.<br>
<br><div class="gmail_quote">On Fri, Dec 10, 2010 at 4:37 AM, Steve Kessler <span dir="ltr">&lt;<a href="mailto:skessler@denverdataman.com">skessler@denverdataman.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
&gt;From a different approach you may also just want to do this with views or PHP in a block and then you can customize anything you want without modifying a module. <br><br>-Steve <br><div><div></div><div class="h5"><br>
<div class="gmail_quote">On Fri, Dec 10, 2010 at 2:12 AM, sebastian chedal <span dir="ltr">&lt;<a href="mailto:inforazor@gmail.com" target="_blank">inforazor@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks for your input, a few final questions about this before i give up on trying to be fancy.<br>


<br>1. Is it not possible to &quot;extend&quot; a module with a custom module? Kinda like if I was object programing? Or is hook_alter also required for this?<br>
<br>2. Is there any documentation I can read about making a module able to be altered? What changes need to be made to allow this?<br><br>3. The nodeasblock.module does have several nodeasblock_*_form_alter functions in it, is it somehow possible to preprocess some of these in a theme or in a custom module, to add the new checkbox to toggle the link being an href yes/no, and to then call a different function [from my custom module] to accomplish this?<br>



<br>Even if this last option is not the best solution [since I should probably submit a patch to the module with the new checkbox as part of the module&#39;s code], I&#39;m curious to just know IF this is possible; so that when I encounter more complicated problems, where what I need to do isn&#39;t necessarily something that anyone else is ever going to want, and I still want to make sure that if the module is updated that my extension to it still (probably) works.<br>



<br>While I appreciate your comment that I could just &quot;leave it&quot; I&#39;m also trying to learn here at the same time the more advanced aspects of drupal at this stage since I am feeling ready for it! At the moment the best solution I have is using PHP at the block-nodeasblock.tpl.php level to do a string replace and strip the a href; but that feels like &quot;wearing a bullet vest&quot; instead of just &quot;getting rid of the gun&quot;.<br>



:-)<br><br>Until now I&#39;ve been depending on a lot of other Drupal people to handle bugs/features when they get hardcore but I really want to get a better understanding for how to modify / extend / hook into and alter modules. It&#39;s hard finding a lot of good information on this, so I&#39;m always open to some good links too!<br>



<br>Thanks again!<br>Really appreciated.<br><font color="#888888"><br>Sebastian.</font><div><div></div><div><br><br><div class="gmail_quote">On Thu, Dec 9, 2010 at 8:55 PM, Larry Garfield <span dir="ltr">&lt;<a href="mailto:larry@garfieldtech.com" target="_blank">larry@garfieldtech.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Unfortunately in that case it doesn&#39;t look like there&#39;s a way in.  You&#39;ll need<br>




to either hack the module or submit a patch back to the maintainer to make it<br>
more flexible.  The latter approach is generally preferred. :-)<br>
<br>
Or just decide that having the link there doesn&#39;t actually hurt anything so<br>
it&#39;s not worth fussing over.  That&#39;s also a viable option far more often than<br>
people realize.<br>
<font color="#888888"><br>
--Larry Garfield<br>
</font><div><div></div><div><br>
On Thursday, December 09, 2010 10:17:12 pm sebastian wrote:<br>
&gt; Hi Larry,<br>
&gt;<br>
&gt; Thank you so much for replying to my query.<br>
&gt;<br>
&gt; So if my contrib module doesn&#39;t offer an _alter() (and it does not) my<br>
&gt; only option is to hack the module? [or worse, use jquery to alter the<br>
&gt; output]<br>
&gt;<br>
&gt; The module is question is nodeasblock and the function implements:<br>
&gt;<br>
&gt; nodeasblock_block ($op = &#39;list&#39;, $delta = 0)<br>
&gt;<br>
&gt; It makes theming decisions in it&#39;s operation, which I need to alter.<br>
&gt; Namely it decides that the $node-&gt;title should be:<br>
&gt;<br>
&gt; l($node-&gt;title, &#39;node/&#39;. $node-&gt;nid)<br>
&gt;<br>
&gt; I need to strip the &lt;a href&gt; since I don&#39;t want my block to be clickable<br>
&gt; and lead to itself.<br>
&gt;<br>
&gt; In other words:<br>
&gt;<br>
&gt; &#39;subject&#39; =&gt; l($node-&gt;title, &#39;node/&#39;. $node-&gt;nid),<br>
&gt;<br>
&gt; will just become<br>
&gt;<br>
&gt;   &#39;subject&#39; =&gt; $node-&gt;title,<br>
&gt;<br>
&gt; I can hack the module, but that seems like a &quot;no-no&quot;<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; Sebastian.<br>
&gt;<br>
&gt; On 2010-12-09 8:04 PM, Larry Garfield wrote:<br>
&gt; &gt; Some hooks that offer definitions, like hook_menu(), will have a<br>
&gt; &gt; corresponding alter hook like hook_menu_alter().  There is no alter hook<br>
&gt; &gt; for hook_block(), though.  That said, there is an alter hook for all<br>
&gt; &gt; forms, hook_form_alter(). So if you&#39;re manipulating a form you may be<br>
&gt; &gt; able to do so that way.<br>
&gt; &gt;<br>
&gt; &gt; --Larry Garfield<br>
&gt; &gt;<br>
&gt; &gt; On Thursday, December 09, 2010 9:22:48 pm sebastian wrote:<br>
&gt; &gt;&gt; Hello,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Having a terrible time finding anything about this, and all I can find<br>
&gt; &gt;&gt; on Drupal.org is the API for hooks, which doesn&#39;t really explain enough.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; My question is, if there is a contrib module with an implementation of:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; hook_block()<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; such as:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; nodeasblock_block()<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; How can I change the values inside of this function, without changing<br>
&gt; &gt;&gt; the function directly?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; can I write something in template.php to catch the nodeasblock_block<br>
&gt; &gt;&gt; hook and then change the values in it?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Or do I need to change the nodeasblock module directly? perhaps adding<br>
&gt; &gt;&gt; the feature as a full blown check box addition or just hack it??<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thanks for any help you can provide me!<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; kindly,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Sebastian.<br>
</div></div><div><div></div><div>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br>
</div></div><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Steve Kessler<div>Owner and Lead Consultant </div>
<div>Denver DataMan, LLC </div>

<div>303-587-4428</div><br>
</font><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>