View Full Version : cat equals zero issue
MichaelMed
07-01-2005, 06:52 AM
Hello,
I was browsing through the site and noted when the top menu template is displaying a category, the home page is indicated as c=0.
I was hoping some had a snippet of code which may work for an "if" statement that could be entered into the template or any suggestions of an easy way to alter the url generated.
Thanks a bunch...
solutionsphp
07-01-2005, 05:50 PM
Hello Michael--
Hmm, I read your post a few times, but I'm not exactly clear on what you are looking for. Can you please elaborate?
I don't know if this helps or not:
Content visible to registered users only.
This if statement displays "a coder's arsenal of PHP scripts, articles, blogs, forums and more!" if we're on the home page.
cheers
SAM :)
MichaelMed
07-01-2005, 06:19 PM
Hello Solutionsphp,
Although this is different than the area I was concerned, thats a nice little tag, thanks.
What I am trying to accomplish remove the c=0 attachment to the construction of the browsing menu, on the navigation bar.
To better explain:
Php Directory (links to inex.php?c=0 - I want it to link to the main page if c=0) > Business (links to business) > Art
I wish to link the begining of the navigation to index.php to eliminate any possiblity of duplicate content being spidered.
Thanks for the help.
Thanks for pointing this out. It will be corrected in the next version, but here is the solution:
in top_bar.tpl search
Content visible to registered users only.
and replace with:
Content visible to registered users only.
solutionsphp
07-01-2005, 06:37 PM
Hello Michael--
Ah, I think I know what you mean now. In your directory's nav or menu bar (where Directory Home > Cat > Subcat links are displayed), your link to Directory Home shows index.php?c=0 in the status bar, correct?
I'm using mod_rewrite and search engine friendly URLs so I do not see this.
I understand your concerns about SE penalties for dupe content. Perhaps you might want to try out mod_rewrite to not only resolve this issue for you but also to generate nice keyword-loaded URLs?
cheers
SAM :)
MichaelMed
07-01-2005, 07:45 PM
dcb,
THANK YOU. I was trying to figure that out, got close but no cigar :)..
solutionsphp,
I just tried the re-write feature and noticed it resolved the issue too. The only problem I have is 602 imported categories with no TITLE_URL in db. They where imported from a previous directory that did not have this feature.
I turned it on but noticed a problem with spaces being handled, so I'll have to edit the db a bit more.
In regards to the dup penalty, it's understandable in my opinion, for the SE's to penalising duplicate pages. I could only imagine how much space it will free-up in their databases, implementing a removal tool for duplicates.
Let me through this in before I get spidered again. I think the featured ads may have helped a duplicate not being recognized, but I am sure a couple pages got picked off, until the next spider...
MichaelMed
07-01-2005, 07:52 PM
AWESOME DCB...
One less resource being used on the server over re-write, and no cuplicate content for /index.php and index.php?c=0
:D :) :lol:
to solve the problem with URL rewrite for the imported categories:
UPDATE PLD_CATEGORY SET TITLE_URL = REPLACE(TITLE, ' ', '_');
Repeat the query several times (replacing ' ' of course) to get rid of the other unwanted characters: ?, /, &, #, etc
You could use other character for replacing, like -
MichaelMed
07-03-2005, 06:44 PM
Thanks once again dcb.
Since the "c=0" issue is resolved, I will leave it as-is. I am trying to conserve resources as much as possible. Re-write seems to use another resources as it requires the access file to load each page.
In regards to your solution, it's simply amazing how PHP can do neat little tricks like that. One little snip of code and a problem is fixed.
Where did you learn PHP?
David
07-03-2005, 06:51 PM
Yes, dcb is an amazing PHP programmer. You can keep up with the changes he is making to the script at {url removed because it was not working}
I might note that the script was created from the combined effort of at least 10 different programmers, as well as no less than 20 people that have contributed financially. This is just getting good. :)
(oh, and dcb is out till Monday night or Tuesday morning)
MichaelMed
07-03-2005, 10:17 PM
Content visible to registered users only.
Thank you for pointing this area out David. I noticed this on another post, but failed to understand the reference. NOW I SEE THE LIGHT :)...
It's hard getting financial support. This program will go far, and in my opinion, should not be given away freely at this point. Although I am sure most people are advocates of open-source applications, often those who contribute to the development do not realize any consideration, or worthy consideration.
Thanks again.
MichaelMed
07-03-2005, 10:27 PM
I think some data is missing on the featured mod:
{url removed because it was not working}
MichaelMed
07-03-2005, 10:29 PM
Please excuse my ignorance on that last post. I relized that is a css file.
David
07-03-2005, 10:32 PM
You should be able to download the latest version (Tarball) here:
{url removed because it was not working}
I don't understand how everything works perfectly.
Also, you can view the log here:
{url removed because it was not working}
MichaelMed
07-03-2005, 10:36 PM
It appears there is an issue with retrieving the templates. I get the impression they are being changed into html.
I will try another method to get the data from the server.
MichaelMed
07-04-2005, 12:00 AM
Several issues with the modifications.
Links where not being displayed, featured or regular links. Header was viewable "Links" (in the h3 tag), but no listings.
Could not login to the admin panel. Warning: Smarty error: validate: validator id 'v_user' is not registered. in ../Smarty.class.php on line 1088
I'm thinking the version I download is not current with the version that has been modified. Another thought, the featured table in db does not contain the data the modification is seeking. For example, non-featured would be 0 while my table is null, featured would = 2 while my table data is = 1.
I'm a bit confused, but will linvestigate further.
David
07-04-2005, 12:06 AM
Well, it may be this version needs some reworking.
Sorry if I gave bad advice about this release being stabel (maybe it is not), but we really do need testing on the development versions as they come out, so thanks for your comments. I'll try to see to it that dcb takes a look at your last reply.
MichaelMed
07-04-2005, 12:10 AM
It's not a problem David.
I noticed some of the indicated changes (comparison view), had slight differences to the files I am running.
I'm trying to figure this out too. Not much of a wiz with syntax, but I can decipher php with close concentration (Human Computer running PHP code :idea: ).
Thank you for the quick reply. I re-installed my back-ups for the moment.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.