Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Category Menu bar options - scrolling clickable category marquee (http://forum.bytesforall.com/showthread.php?t=6973)

alfie May 4, 2010 09:13 AM

Category Menu bar options - scrolling clickable category marquee
 
Category Menu bar options and ability to scroll (1 post)
may also be referred to as a scrolling marquee


My questions relate to atahualpa options. I have a a Category menu (bar2) implemented as part of the header. I would like the category selections to scroll within bar2. It is more of a cosmetic feature (but it is an important feature which attracts attention) since i also have a category listbox in the left sidebar. In addition to scrolling the categories must be clickable.

Another feature which would be helpful is to have a clickable down arrow which would provide more category selections. (only a single level would be desired) that also would be helpful but not as attractive as the scrolling category menu.

I tried all the existing options. Other than the count option they all seem to work, I tried the count option but I could not understand what it was supposed to accomplish. ---I didn't see anything happen. One additional plugin that worked in conjunction with the categories allowing a pre-determined selection can be used but the ability to scroll is best. Any additional information would be appreciated.

Thank you in advance Alfie

juggledad May 4, 2010 09:45 AM

this is not something that is built into the theme. You could look for a plugin or code your own. if you don't know how to do this type of coding, I suggest you offer to hire someone to do it for you if you can't find a plugin that will suit your needs.

lmilesw May 4, 2010 10:09 AM

I don't know if this is what you are looking for but on a whim I tried it and it worked for me. In the Configure Header Area use the following code to scroll the category menu.
<marquee>%cats</marquee>

juggledad May 4, 2010 12:12 PM

be aware <marquee> is not HTML compliant

lmilesw May 4, 2010 12:24 PM

Now that you mention it I knew that and I subsequently found that the links on the menu bar don't click when it is scrolling.

alfie May 4, 2010 03:29 PM

I'm willing to try to modify the code but can you point me in the right direction. Which file ? What code to look for? etc

This would be a better solution then anything I presently see.




Alfie

alfie May 4, 2010 03:58 PM

I tried using the code <marquee>%cat</marquee> but all I observed was a blank scroll bar moving from right to left below the menu bar with all the categories remaining the same?

Alfie

lmilesw May 4, 2010 04:05 PM

Now I think I understand what you are trying to. You don't want the whole bar to move just the categories within it. I have no idea how you would accomplish that and given the minimal benefit it seems like putting much time in figuring out how doesn't seem worth it. Why not just have the category bar a different color to grab attention?

alfie May 5, 2010 09:39 AM

Thanks for the advice Imiles however I'm looking at it from a different perspective.
First I do wish to see all the categories scrolling across the screen. I would like them to be clickable but even if they are not, that's a good starting point.

What i want is an eyecatcher - the visitor will first be fixated upon the marquee, if he/she chooses to they can also select to use the sidebar list box which is working with all categories shown.

Presently using the ATO there seems to be some awkwardness. In heading config I experimented with name and tried levels of 0, 1 and count - all seem to display two lines of categories. Its working but doesn't look good.
The marquee would look professional.

Count doesn't seem to change anything and if i use the plugin that would only allow me to select specific categories to display but I want to see all categories without seeing multiple bar lines which does not look good.

Thanks for listening any input would be appreciated and of course if Juggledaddy would comment that would be great!

Alfie

juggledad May 5, 2010 10:06 AM

I don't see any way to make a marquee that you could click on the scrolling text and have them link to different locations. I think even if you could, it would be annoying to the visitor (at least I would find it annoying) to have to chase the link with your mouse, and wait if it happened to scroll off the screen.

A marquee is something to be used for announcements, to be read not clicked on - at least that is my opinion

alfie May 5, 2010 09:02 PM

JuggleDaddy

We're not on the same wavelength. Here is the way i am thinking. We're walking down Broadway in NYC and we suddenly see this marquee on the side of a large building. It grabs our attention. The categories are "Phantom" playing on 45St or "How To succeed in Show Biz" on 48Street. If we're interested all we have to do for details is walk over and see what it's all about (that would be clicking on the sidebar drop down list) ---Of course if the categories are clickable and we just happen to see something we like - we can click on it and see the details. In any case we can always go to the sidebar. No need to chase the moving categories on the marquee (if we can control the speed) and if it is just for cosmetic purposes --- we just go to the sidebar for details.

Right now I have 4 levels of category bar menus which looks very awkward. True it does attract my attention but it looks very unprofessional.

I hope you understand.

Alfie

juggledad May 6, 2010 06:32 AM

ok, here is a solution for you
1) get and install 'Marquee-Plus'
2) edit the plugin code Marquee-plus.php and replace line 19 - which is
HTML Code:

            $marqueeplus_value_1 = html_entity_decode(get_option('marqueeplus_nrc_text1'), ENT_COMPAT);
with
HTML Code:

                $marquee_cat= '';
                $categories=  get_categories();
                        foreach ($categories as $cat) {
                                $marquee_cat .= $cat->cat_name.'  -  ';
                        }
            $marqueeplus_value_1 =  $marquee_cat;

3) add '<?php echo show_marqueeplus1(); ?>' to ATO->Style & edit HEADER AREA->Configure Header Area
4) edit the Marquee-Plus options:
a) set 'Text 1: Is Feed (Yes/No)?' to 'NO'
b) set 'Text 1: Direction (LEFT/RIGHT/UP/DOWN): ' to what ever you want
(leave width blank to go the full width of the page)

They won't be clickable,but you will have your category marque

alfie May 6, 2010 02:41 PM

JuggleDaddy

Thanks for the info I will try it soon. What is the issue with making it clickable.

Alfie

juggledad May 6, 2010 04:06 PM

I don't know if the plugin has the ability to make the marque clickable.

alfie May 7, 2010 08:39 AM

I installed marquee-plus

I get to item 4) with the plug in activated but all i see is ability to edit code, I do not see where I can set options for Text1?

I also went to their website where they show screenshots for setting text1 but its no-where to be found?

juggledad May 7, 2010 08:47 AM

dashboard->settings->Marquee-Plus - top of the page

alfie May 7, 2010 10:21 AM

Found setting on lower left icon. I now have everything exactly as you stated. Text1 textbox is blank Is feed is No.

Text1 is Direction: left Speed:2 width: blank height: 200 and BG: red

When I executed I still had 3 levels of categories and no Marquee.

I then added <marquee>%cats</marquee> and The three level of categories disappeared and i saw a blank scrolling marquee (no categories)

I changed the scroll from left to right but it still scrolled left.

The only indication that it is seeing the code is the fact that the three levels of categories disappeared.

Before I tried this I just added <marquee>%cat</marquee>, I still saw the blank scrolling marquee but the three levels remained.

Any thoughts?

juggledad May 7, 2010 10:38 AM

No where did I say to add '<marquee>%cats</marquee>', step 3 says to add '<?php echo show_marqueeplus1(); ?>'
did you edit their code like I show?

alfie May 7, 2010 12:09 PM

Read my last thread again I did add step 3) first, and i saw the marquee scroll but i still had 3 levels of categories.

I then added the <marquee>@cat</marquee> as was suggested by Imilesw.
That was my own experiment - that is when the 3 levels of categories disappeared and the marquee scroll remained.

However I now have a hangup as a result of experimentation. I attempted to de-activate the marquee-plus plugin and return to my previous state. When I did this I forgot to use the ATO to remove step 3). When I try to enter the admin panel it goes directly to the application and i get an error that it cannot find function show_marqueeplus(1). Unfortunately I cannot use the admin panel and ATO to remove it.
I then tried to search the files for the function but it did not find it. Can you tell me in what file Atahualpa saves the Header config items so i cannot remove this code instead of using the ATO.

Sorry for the further complications but anyhow this is something that I should know how to do.

Alfie

juggledad May 7, 2010 12:39 PM

So how well do you know phpMyAdmin? Because the value is stored in the wordpress wp-options table. This is not something to muck with if you don't know how.

You could also delete the atahualpa folder from the themes folder, this will default you back to the default theme, then deactivate the plugin, then reinstall atahualpa and activate it and remove the code from the ato->header config

Or of course you could just reload your backup copy of the wordpress database. You do have a backup right?

alfie May 7, 2010 12:55 PM

Yes I do have a backup but I would lose a days entries of posts, I can do this but I would prefer not to.

I am familiar with phpMyadmin but I have as yet not looked in the wp-tables. It won't hurt forme to look. Anything specific I should look for?

Don't wish to delete the Atahualpa folder because I have made some minor code changes but its good alternative if necessary.

In any case if you can review the original code and the results of my tests it would be appreciated.

Thanks Alfie

juggledad May 7, 2010 01:21 PM

Copy the theme folder to your computer, then delete it from the themes folder. This way you can upload the current version you have

alfie May 7, 2010 02:05 PM

I used phpMyadmin to look at the wordpress database. I have accessed and changed the w-_users db but i can see that the others are too detailed to jump right into. There is no way to quickly modify unless I would be directly guided.

Its hard to undestand how items in the header ATO config go directly to a db. It appears as though they belong in css or php files??
Data such as posts, categories, users, roles, privileges etc belong naturally in the db.

I realize now that the code i changed was in wordpress and not Atahualpa. So if necessary I could replace as you suggested.

I should be up and running on monday.

juggledad May 7, 2010 02:22 PM

Almost every theme and plugin uses the Wordpress database to store information, that's what it;s there for to store and retreive information. Some themes and plugins even add their own tables to the database, others use existing tables. There is nothing wrong with this.

our easiest way back is to do what I suggest - copy hte theme, delete it, use the default theme to activate the plugin, reinstall teh theme and then clan out the header config. That process shouldn't take more than 1 or 2 with most of that being the time it takes to FTP the files back and forth. If ou relaay know our ftp rogram you can just move the folder from the thems folder to somewhere else then put it back later.

have fun

alfie May 10, 2010 09:52 AM

Juggledaddy

AS of this morning I tried several things. I removed the Atahualpa theme and downloaded Atahualpa3.4.6
When I tried to enter the admin panel I got the same marquee error. I then removed the marqueeplus plugin, ran it, same error. Just for complete info here is the error printout.

-------------------------------
Error report


%pages %bar1 %logo %bar2 %image
%cat scrolling across screen to the left
Fatal error: Call to undefined function show_marqueeplus1() in C:\xampplite\htdocs\wordpress\wp-content\themes\atahualpa\functions\bfa_header_conf ig.php(352) : eval()'d code on line 1


I attempted to follow the error report to the code below:


function bfa_header_config($header_items) {




// Horizontal bar 2
if ( strpos($header_items,'%bar2') !== FALSE ) {
$horizontal_bar2 = '<div class="horbar2">&nbsp;</div>';
}


$header_item_numbers = array(
"%pages",
"%page-center",
"%page-right",
"%cats",
"%cat-center",
"%cat-right",
"%logo",
"%image",
"%bar1",
"%bar2"
);

$header_output = array(
$page_menu_bar,
$page_menu_bar,
$page_menu_bar,
$cat_menu_bar,
$cat_menu_bar,
$cat_menu_bar,
$logo_area,
$header_image,
$horizontal_bar1,
$horizontal_bar2
);



// Parse PHP code
if ( strpos($header_items,'<?php ') !== FALSE ) {
ob_start();
eval('?>'.$header_items); // line 352 where error occured
$header_items = ob_get_contents();
ob_end_clean();
}



$header_items = trim($header_items);
#$header_items = str_replace(" ", "", $header_items);
$final_header = str_replace($header_item_numbers, $header_output, $header_items);



echo $final_header;
}


******** I then removed the plugin marqueeplus

same results.


It seems that it must be getting data from the database ???????
--------------------------------


All times are GMT -6. The time now is 10:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.