Jump to content


Corporate Sponsors


Latest News: (loading..)

jefs.42

Member Since 10 Nov 2005
Offline Last Active Sep 26 2011, 13:07
-----

Posts I've Made

In Topic: Header Tags SEO

26 September 2011, 00:19

View PostJack_mcs, on 25 September 2011, 18:10, said:

The silo code is not complete. It will work in pre-2.3 shops but I don't recall even testing it with 2.3.

Ah, that would do it ;)

I haven't actually tried the pre-2.3 version. Seems like it would work fine because if $linkList is empty it "returns". Otherwise it falls through and outputs the $info_box_contents. This was the first I've played with the silo at all so happened to be a 2.3 version. Figured maybe I was just doing it wrong that it wasn't outputting anything other than the heading no matter what page I went to, so opened up the bm_headertags_seo_silo.php to try and find out why.


With the class/functions setup you have in the 2.3+ version you have this in the execute() function:
' <div class="ui-widget-content infoBoxContents">' .
$this->get_list() .
' </div>' .

Which would output whatever the function get_list() returns. But as mentioned above, the current code for the get_list() function never returns anything. It either
a. just returns if $linkList is empty or
b. still just returns because that's the end of the function

So regardless of whether $linkList gets populated, or is empty, the output of $this->get_list() is always nothing.

Otherwise the actual list getting seems fine. With the change I mentioned above (ie, actually returning the list when it's not empty) works nicely. It then does output a list of links - subcategories, products, etc.


Thank you for this and all your addons. I've used them well [img]http://forums.oscommerce.com//public/style_emoticons/default/wink.png[/img] So just wanted to help out in case this hadn't come up before and/or you weren't aware.


The second part, like I said, was just a thought/feature request in the case where $linkList is actually empty. So then it wouldn't just output a heading with no content.

In Topic: Header Tags SEO

25 September 2011, 17:14

Hello, I was trying to look through the posts to see if it's already been mentioned. Didn't find anything, but may have missed it.

I was trying out the silo box for the first time, but it was always empty. This is for the "greater than 2.3" files.

I found that in includes/modules/boxes/bm_headertags_seo_silo.php the links are never returned.
In the get_silo() function it ends with

if (empty($linkList))
   return;

but doesn't do anything when it's NOT empty. So nothing is returned either way. I believe the code should be
if (empty($linkList))
   return;
 
return $linkList

So if empty, it returns nothing. But if it's not empty it returns the actual list of links that was just created.

Also, maybe more of a request, but I think the output should be adjusted so that if $linkList IS empty, the box won't output anything. Currently it will output the header with an empty box. Maybe something like
  if (!empty($this->get_silo()){
   $data = ...
 
  $oscTemplate->addBlock($data, $this->group);
}