The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

5 Pages V « < 3 4 5  
Reply to this topicStart new topic
> Show 1 div with PREV - NEXT link, hiding all others, Show 1 div with PREV - NEXT link, hiding all others
Baffled in Baltimore
post Feb 4 2009, 11:48 AM
Post #81


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE
focus will probably be directed to making the move to the FTP host
Hello everyone;
Other health issues aside, my vision continues its degradation so I must press on with asking your help.

My FTP host is now in use and will be transferring domain soon. This host supports many server-side scripts and other functions, including MYSQL. I am a bit green when it comes to this so please bear with me while I ask your indulgence and to puruse the following:
Website under construction
The page this link opens is a brief narrative of what I am asking help with. Included also is a zip file you can download. This archive contains the files in use on the active website but with everything in their respective folders.
Please consider the archive as a boiler-plate of "what's there now" and as a starting point.

Thank you for your time.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 13 2009, 08:27 AM
Post #82


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE
However, I think it's better to use a database-backed system to generate different content at different URLs, rather than to have a single URL with multiple views depending on what JavaScript is doing.

Greetings Darin:
I finally moved my Domain to the startlogic server; (About time!) but there was little time for the tedious task of transferring everything over from that freewebs thing. There are many missing files I have yet to re-create and I am hoping there is a better way of page generation than the sloppy methods previously used. (I didn't know any better).

I now have server-side functionality including MYSQL, PHP and many other server-side scripts but I don't know how to use them well-enough to make any of it work. My vision continues to degrade so it is very difficult (and painful) to do much reading.

Could you Please elaborate on how I can use this, or some other method to generate Dynamic content or pages.

If data-base driven is the way to go, setting-up a few data fields might be a place to start. I don't know; you decide. How do I tackle this mess?

Thank you for your time.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 13 2009, 01:25 PM
Post #83


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Sorry, but I don't have experience developing an ecommerce system. I've worked on such projects, but as a release engineer, not as a developer.

Perhaps one of these PHP shopping-cart programs will meet your needs.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 13 2009, 01:55 PM
Post #84


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE
Perhaps one of these PHP shopping-cart programs will meet your needs.

Thanks Darin
Actually, I did try shopcms_1_1_0 but find myself confronted with the same problem; I can't see well-enough to focus on what I am trying to do.

Thanks again
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 13 2009, 02:25 PM
Post #85


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Based on what you've written, to me it sounds like you need to get a computing environment that is better adapted to your needs, before you can proceed with this project on your own.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 13 2009, 07:27 PM
Post #86


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE(Darin McGrew @ Feb 13 2009, 02:25 PM) *

Based on what you've written, to me it sounds like you need to get a computing environment that is better adapted to your needs, before you can proceed with this project on your own.

Hello again Darin;
I had to re-installed everything on a new drive as my old drive became unstable. Suffice it to say, I had my share of challenges of late. I think that most of what's gone wrong is due to my inability to see well. I am here again because I have too much trouble reading most of what is found on the WEB; issue of primary concern is Contrast (I can only do so much thru a browser.) I can read high-contrast text to background but not when a low-contrast enviroment is encountered like in many of the sites I visited. This forum is adequate as it meets certain needs for this.

Since I now have server-side use but an un-configured data-base for now, what can you advise in using say, PHP or SSI for targeting to a webpage containing named div wrappers? A good sample or 2 will work wonders for me.

I know my data-base would be a good source but not sure how to structure it so I'm leaning towards PHP and maybe one or two external files for the source content.

Thank you again for the help
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 13 2009, 07:43 PM
Post #87


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



You can enforce high contrast by configuring your browser to ignore document colors, so it will use only your own colors.

I don't have experience with PHP, and I don't have experience developing ecommerce systems. I've worked on ecommerce systems as a release engineer, but not as a developer.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 14 2009, 08:49 AM
Post #88


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE
You can enforce high contrast by configuring your browser to ignore document colors, so it will use only your own colors.
Ok, Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 25 2009, 11:16 AM
Post #89


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



Hello Christian, J
Thank you again for all your great help, I learned a great deal from you.

Regarding PHP
Since I now have server-side scripting capability, (YEAHHHH!!!) I was wondering if you could help with this;

auto1.php

The php currently loads into an iframe from one of my pages and it in turn loads in an external file called "test.html". How do I add a thumbs section to the php script if the external html that contains it has a DIV ID'd as "gallery"?

The PHP you provided
CODE
<?php

// content of the remote HTML page:
$content=file_get_contents('test.html');

// divide HTML page content into sections, separated by the string "#separator#":
$section=explode('#separator#', $content);

// last item of two or more:
if(isset($_GET['section']) && count($section)>3 && $_GET['section']=='100'.count($section)-2)
{
    echo $section[(count($section)-2)].'
    <p>
    <a href="?section=100'.(count($section)-3).'">Previous</a>
    Next
    </p>
    ';
}

// items between the first and last:
else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2)
{
    for($i=2; $i<(count($section)-2); $i++)
    {
        if($_GET['section']=='100'.$i)
        {
            echo $section[$i].'
            <p>
            <a href="?section=100'.($i-1).'">Previous</a>
            <a href="?section=100'.($i+1).'">Next</a>
            </p>
            ';
        }
    }
}

// first item of two or more:
else if(count($section)>3)
{
    echo $section[1].'
    <p>
    Previous
    <a href="?section=1002">Next</a>
    </p>
    ';
}

// single item:
else
{
    echo $section[1].'
    <p>
    Previous Next
    </p>
    ';
}

?>


Thanks again
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Feb 25 2009, 10:17 PM
Post #90


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE(Baffled in Baltimore @ Feb 25 2009, 11:16 AM) *


Regarding PHP

Addendum
What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Thanks again.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 26 2009, 01:30 PM
Post #91


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



QUOTE(Baffled in Baltimore @ Feb 26 2009, 04:17 AM) *

What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Do you mean you want the gallery on a page of its own? Or do you want the gallery to show up on all detail pages?

BTW, the thumbnail gallery can be generated automatically. For example, the script might count the number of sections in the external file and create a link with an IMG element for each section. A possible disadvantage is that each image's file name must contain same number as the product, say "1001.jpg" or "pic_1001.jpg". Also the image's ALT text can't be made much more descriptive than say "Article no. 1001".

This post has been edited by Christian J: Feb 26 2009, 05:28 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Mar 26 2009, 01:00 PM
Post #92


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



Hello Christian, J

Please forgive my lengthy absence; vision went out for awhile. Thanks for your reply, your suggestion sounds good. If your idea includes using pre-existing targeted content from a given category page, sure! lets try it; please keep in mind, any images I target are URL's to differing sub-directories from my supplier's server. This method was used because I had no server-side access at the time my site was written (but I do now) and saw no point in duplication; downloading thousands of images was out of the question.

I would like to switch-up a little by asking your help in a twist to the same theme by combining the functionality of the jscript you provided (Prev - Gallery - Next) with the characteristics of the PHP script (1-at-a-time, displays links at bottom) by adding the gallery link to the PHP and moving the displayed links to the top of each file.

The idea is to replace the Gallery with a Table of Contents, and the TOC is a set of text links to all Category Pages. This would be similar in function to what was already done; show 1 item at a time.

When the user clicks the Catalog link from any of the main pages, the PHP is opened starting with the Table of Contents instead of a gallery. What I would like to try; is either combine the toc and all category pages into one file, or have the Table of Contents as a seperate file and use PHP for displaying whatever category is selected from the TOC. I believe the latter notion would be preferred to reduce bandwidth and minimize download time.

The category pages are set up as DIV'd content consisting of all images and content for that category. Only the images and their content are set-up and displayed as a list for each category page. A working example page can be found here.

In re-deployment of this site, an error occured during the transfer, deleting many of the original files. This left me with uploading a different site written with Publisher. Not a good choice. It was something I was toying with earlier on but became a backup; the only one I managed to recover when local drive was replaced. I'll be going back to the original theme whrn I can implement the PHP idea.

Anyhow; The following is the PHP script you provided for displaying 1-at-a-time. This is what I'd like a 3rd link added to and all links to be displayed at the top of each page. thanks again

CODE
<?php

// content of the remote HTML page:
$content=file_get_contents('test.html');

// divide HTML page content into sections, separated by the string "#separator#":
$section=explode('#separator#', $content);

// last item of two or more:
if(isset($_GET['section']) && count($section)>3 && $_GET['section']=='100'.count($section)-2)
{
    echo $section[(count($section)-2)].'
    <p>
    <a href="?section=100'.(count($section)-3).'">Previous</a>
    Next
    </p>
    ';
}

// items between the first and last:
else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2)
{
    for($i=2; $i<(count($section)-2); $i++)
    {
        if($_GET['section']=='100'.$i)
        {
            echo $section[$i].'
            <p>
            <a href="?section=100'.($i-1).'">Previous</a>
            <a href="?section=100'.($i+1).'">Next</a>
            </p>
            ';
        }
    }
}

// first item of two or more:
else if(count($section)>3)
{
    echo $section[1].'
    <p>
    Previous
    <a href="?section=1002">Next</a>
    </p>
    ';
}

// single item:
else
{
    echo $section[1].'
    <p>
    Previous Next
    </p>
    ';
}

?>



I am open to suggestions;
Thanks again for your help...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Mar 30 2009, 08:34 AM
Post #93


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE(Christian J @ Feb 26 2009, 02:30 PM) *

QUOTE(Baffled in Baltimore @ Feb 26 2009, 04:17 AM) *

What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Do you mean you want the gallery on a page of its own? Or do you want the gallery to show up on all detail pages?

BTW, the thumbnail gallery can be generated automatically. For example, the script might count the number of sections in the external file and create a link with an IMG element for each section. A possible disadvantage is that each image's file name must contain same number as the product, say "1001.jpg" or "pic_1001.jpg". Also the image's ALT text can't be made much more descriptive than say "Article no. 1001".

Hello again Christian, J;
I'm sorry, I missed what you asked before. The idea is to have a link available so that the gallery can be called at any time. I mention Gallery out of habit; the Gallery will be replaced with a Table of Contents and the DIV'd content will be replaced with one page div'd in the same way except one section will be a category listing instead of a single item.
The problem with this idea is it will make for a slower download if one large file is used. The category pages are currently saved as seperate HTML files but unsure how to load in a specific category page with PHP; especially when linked from the Table of contents page. I would like to maintain one file for the TOC and the category pages as seperate files. There may be roughly 30-pages total with the TOC available by link from whatever Category page is viewed. An alternate would be to have the TOC side-barred when the PHP script is called for the Category pages. The example page depicted in previous post is how the page would display when called.

That's the idea anyway; I hope this clears it up.

Thanks again;

This post has been edited by Baffled in Baltimore: Mar 30 2009, 09:23 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 30 2009, 06:20 PM
Post #94


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



Sorry, I've been a bit busy lately (still am). Maybe you could hire someone else to do this for you?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Mar 31 2009, 08:11 AM
Post #95


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



QUOTE

Maybe you could hire someone else to do this for you?
Can't afford it; dissability... It's a shame too, I even had to drop my accademic endeavours

I realize there is only so much that can be done here and this is probably a tall order;
Prognosis is maybe a couple of years before total blindness sets in. My girlfriend wants to administrate, but if it involves anything outside the 26-letters of the alphabit, she's further in the dark than I am. At least I have some programming experience; it's outdated (about 30-yrs) and mostly forgotten, but is there. Certain characters I can't see anymore but with some prodding, I believe some of what was lost will come back; maybe to the point of eventually bringing this to culmination on my own.

Bits and chunks in whatever time frame you can spare is all I ask; no hurry.
As long as there is black paint on a white canvas, I can still read it (most of it anyway).

Sorry to be a pain
and Thank you...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Baffled in Baltimore
post Mar 31 2009, 10:56 AM
Post #96


Member
***

Group: Members
Posts: 51
Joined: 9-January 09
From: Baltimore, MD
Member No.: 7,507



I recovered a test file here.
It is the PHP that loads in the Table of Contents and combined category pages separated with the #separator# string. The file it looks for is found here

The TOC links to the appropriate categories but only when opened on its' own (without the PHP script.) One of the problems I am having is linking under PHP. It would be very helpful if you can assist with this one.

The 3rd link I seek is to cover the Table of Contents. This would be added to the existing Prev - Next links It would be better if the links can be moved to the top of file when displayed; this will prevent the need to scroll the whole section before encountering the links again.

Again, this is a test file with ALL combined content but individual files exist and is preferred to use this method but I don't know how to target them using the script. Display 'One-at-a-time' still holds so PHP is used.

Site will remain mostly static, only SOME server-side scripting functions are needed; at least until I can afford to have it professionally done.

Thanks again

This post has been edited by Baffled in Baltimore: Mar 31 2009, 11:44 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

5 Pages V « < 3 4 5
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 05:31 PM