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 ???????
--------------------------------

juggledad May 10, 2010 11:09 AM

do the following and only the following and report back
1) go into the atahualpa theme folder and rename index.php to indexold.php
2) go into the backend of your site, you will have defaulted to the default theme
3) go to dashboard->Plugins - activate the Marquee-plus plugin
4) go into the atahualpa theme folder and rename indexold.php to index.php
5) go to dashboard->Appearance->Themes - Activate the Atahualpa theme
6) go to ATO->Style & edit HEADER AREA->Configure Header Area - remove everything but '%pages %logo %bar1 %image %bar2'
7) go to dashboard->Plugins - de-activate the Marquee-plus plugin
8) go to the front end - is it working with no errors (there will be no marque)

alfie May 10, 2010 03:38 PM

As per your last instructions. In Atahualpa theme I changed index.php to indexold.php then executed command to get to backend(admin panel) and get nothing but a blank screen.

However I have a backup in which I lose a few posts but I can get back to where we were.

All this is very puzzling. It should be able to enter the admin panel irregardless of selection of theme or plugin. Once in the admin panel I should be able to make theme and plugin selections. Logic tells me that, that is the way it should work. Seems as though it goes into admin panel and immediately jumps into wordpress where the error occurs.

It also does appear that the "echo show_marquee" that we input via the ATO header config is actually in the wordpress_db. How do we get rid of it without the use of the admin panel ATO?

If all this could be explained the whole exercise would be worth while and justified as education but if necessary we can merely just go back to using the backup.


Alfie

juggledad May 10, 2010 04:40 PM

well do you have anything in the themes folder besides the atahualpa folder? Do you have the default theme there?

alfie May 11, 2010 09:56 AM

JuggleDaddy

The themes folder has classic, default and Atahualpa.

When I enter the admin panel it seems to like to go to Atahualpa (without my reuest click?). Before changing index.php to indexold.php that is when we were getting the error. When we changed to indexold.php we got a blank screen (I believe it cannot find index.php and that is the reason for the blank screen) but in either case it liked to go to Atahualpa. You had expected that it would go to the default theme. Suppose i just copied Atahualpa to a temp directory so that I had only default and classic in the theme folder would this accomplish what you were trying to do?

As I said before if I understood what is happening here that would definitely be worthwhile (I'm beginning to realize that I do not understand exactly how Wordpress works and certainly not where the ATO is placing the config data. )

Yes I would like to isolate this problem but I can quickly use my backup and get back to our original marquee problem.

Whatever you wish to do or both.

juggledad May 11, 2010 10:03 AM

alfie, are you renaming the index.php in the themes folder or the index.php in the atahualpa folder? you should be renaming the index.php that is in the atahualpa folder

juggledad May 11, 2010 10:06 AM

when you rename the index.php in a theme, you are effecively deleting the theme. When wordpress starts up it looks for the current theme (by accssing the DB to find out what is active) then it looks in the themes folder for it. If it can't find the theme, it reverts to teh default theme.

If this is not happening, you have some other issue going on.

alfie May 11, 2010 02:08 PM

I renamed index.php in the Atahualpa theme. I understand what you are saying but apparently it does enter the atahualpa theme and doesn't like indexold.php therefore, the blank screen. When I renamed it back to index.php I then got the same marquee error again.

If this is one of those puzzling situations with no immediate answer why don't I just use the backup and return to the marquee code problem and see if we can solve that.

juggledad May 11, 2010 02:57 PM

Do what you wish, I'm just trying to point out that there is something 'different' about yur wordpress.

What version of Atahualpa and WordPress are you running?
What version of php?

alfie May 11, 2010 03:27 PM

Wp 2.9.1 Atahualpa 3.4.6
php 5.1

I replaced system with backup and I am working again, I lost a few posts but i can re-enter.

I downloaded marquee-plus again and re-entered the code you gave me. i did not enter the echo show_marqueeplus1(); because it did nothing the last time and I still multi levels of categories. It appears as it we are not loaded tghe marquee with data. I looked at the code and added $output = $marquee_cat; below your last line. However in order to make it scroll it seems that i must surround %cat in the ATO header config with <marquee>%cat</marquee> otherwise it dfoes not scroll. With this it scrolls but there is no data.

Wanna take another shot at it.

juggledad May 11, 2010 04:01 PM

I think you are confusing two different effects. teh code '<marquee>xxxxxxxt</marquee>' is an HTML code that will scroll what ever is in between the '<marquee>' and the '</marquee>' across the screen. But as I said in post #3 the <marquee> </marquee> is not HTML compliant

The reason you see the categories is because when Atahualpa process the header config, it replaces the %cat with a list of all the categories.

All of that has nothing to do with the 'marquee-plus' plugin or teh code change I gave you to change it. At this point I would suggest deleting the marquee-plus . The code I gave you was something I thru together and I don't plan to support it and I'm sure the author of the plugin won't eithor.

So basicly you can use the <marquee> </marquee> if you so choose, but I have no more to offer.

alfie May 12, 2010 08:22 AM

Cannot use the <marquee> </marquee> tags since it may scroll but there is no category data. I believe that there is something wrong with the way in which the get_categories() is being used in your mod. Wordpress does not provide troubleshooting by using breakpoints and watches therefore it is impossible to stop and check to see if the categories have been added to $marqueeplus_value_1 . Is it possible to use an echo statement (like they used to do in the early days of computers) but then where would we look for the results.

One more comment on this subject. The category marquee approach would be very useful in Atahualpa and I'm sure that the author of the marquee-plus plugin may be interested in evaluating what we have started. I tried to leave a comment on their website but they are having problems. If i could get their e-mail address I would try to desribe the problem.


Placing all this aside using the multi level category bar in Atahualpa keeps growing to multi levels and is not very attractive. Using the basic ATO options what can i do to improve appearance. I tried the count option but it didn't seem to do anything?
The plug-in option that was offered was also very limited.

Everything I've said here indicates that we should not give up on the marquee scroll approach.

lmilesw May 12, 2010 08:31 AM

Alfie,

I really think you should look at a different taxonomy. What you are describing seems like it is going to get very confusing to visitors to your website. Maybe you should consider using tags instead of categories and use one of the many tag cloud plugins. Just my .02 worth.

juggledad May 12, 2010 10:23 AM

Alfie,
If you would like my continued support on this, I have to charge you, I've spent too much time for free on this (I'm not paid for this help I give). The change to the plugin was meant as a one time hack. If you want personal support, send me a PM and I'll quote you my rates.

alfie May 12, 2010 11:17 AM

Juggledaddy

I really appreciated your efforts and i would love to place you on the payroll however at this point there is no payroll and I'm not in a position to create large expenses. However i believe I have a great idea and if it takes off and I can raise money that will be an option for this problem or the many others that probably are still to occur. In the meantime I'll try to spend some time on it myself while I'm also trying to perform the duties of an editor. I have made a donation and will continue to add small contributions until I'm in a position to go big time.

Thanks for your time and effort.



Imilessw

Perhaps you would like to discuss the appropriate taxonomy of the present Atahualpa category bar2 which I feel is prfesently awkward. I have made a number of references to why I believe this is true in the above dialogue. That is why I believe that the marquee method is so important. Again i refer you to the many marquees that exist on buildings in NYC and how they have effectively attract visitors.

Alfie

lmilesw May 12, 2010 11:46 AM

Alfie... I like the way the current menu bars work and highly resist making it more cumbersome. Buildings are not the web just as print media is not the web. I urge you to think about what the purpose of your site is and design the navigation around that. Scrolling, blinking, and flash animation are to most in the industry distractions rather than attractions. People want to quickly get to what they are looking for and if they have to wait for stuff to scroll or come into view they will be gone in a heartbeat. Maybe I am not clear on what it is you are trying to accomplish and if you have an example even a poor one please post a link. Good luck on your quest.


All times are GMT -6. The time now is 07:57 AM.

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