php forum
php mysql forum
php mysql smarty
 
Topic Options
#311271 - 08/13/06 01:53 PM Need Help Finishing Custom Mod
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
In 2-3 weeks I want to launch a new shopping cart for my site, along with a means of reselling storefront & shopping cart services to my community from mywebsitetools.com service pkg. Ubb.c 6.7.2 - www.dragboatalley.com

To integrate these new services with my existing site, I want to a add a "Shops Index" script that's tied into to my standard tabs menu. So I swooped a copy of AA's [6.7] [beta] ubb.index v1.5 and laid out the main index page to look like the games mod

http://dragboatalley.com/cgi-bin/dbashops.cgi

Ultimately, i got 2 types of "shops" to show up in here, with shop name & thumbnail image that links to a storefront (product list) page either embedded on my site, hosted on the service provider's site, or some other site. ( Demo Storefront )

So I'm looking for help to finish this script while I finish setting up the storefronts & informational portal pages that go with 'em. I need someone to do the real work of hooking this shell script up to a data file for the following requirements:

  • Add an admin-only page where i can view/add/edit/delete the list of shops
  • Data file fields include: unique id, shop type (0 || 1), shop name, shop URL, image filename (thumb), activated/deactivated flag
  • finish the main page to spin off the display of shops (just like games mod but using data file). Shops get listed in each column based on shop type field (0 = left column, 1 = right). plus handle multiple pages & only show me the 'activated' shops
  • and sprinkle in a few wordlets for ease of long life cosmetics; Page Title, 2 Column Titles (shop types), location on disk of "shops" directory where thumbnail images be kept, etc.

Here's the shell script i put together so far:
http://dragboatalley.com/shops/dbashops.txt

Let me know if you have any questions, or contact me by PM or email to boards @ dragboatalley.com w/ price quote on the job if your interested. And fwiw - I'm more than happy to play test/debug/polisher monkey here if someone just wants to whip up a down 'n dirty quickie blind stab at this. Tks!
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311291 - 08/15/06 04:37 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
Didya get any takers? It's been a while since most of us have looked at any perl code smile
_________________________
- Allen wavey
- What Drives You?

Top
#311295 - 08/16/06 08:00 AM Re: Need Help Finishing Custom Mod [Re: AllenAyres]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
nada (sigh) but i knew i was fishing a near empty pond before i posted this, but i hate perl so intensively figured it was worth a shot smile

Meanwhile i did fiddle this abit myself and got the main shops index / shopping mall page to halfway work:

http://dragboatalley.com/cgi-bin/dbashops2.cgi

and showing folks on my site a sneak peak of this has already sold me a couple of shopping carts. So I guess I aint got no choice but to finish it myself frown can you move this topic to the new members forum for me? cuz there's a whole waft of perl idgit questions coming soonly.
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311296 - 08/16/06 04:42 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
hehe smile It's looking good already. I'll move this there now and just ask when you run across something smile
_________________________
- Allen wavey
- What Drives You?

Top
#311298 - 08/16/06 06:01 PM Re: Need Help Finishing Custom Mod [Re: AllenAyres]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
Ok I'm totally stuck on handling multiple pages, and this is all i need to finish my sub showmain that does the shopping mall main index.

I have $page var and $totpages var that tell me current page number to display and the total pages in the index.
plus I have a $shopcolcnt var for the number of shops per column. then I get to follow bit that parses the datafile

Code:
# one datafile how da heck to split it into pages
@datafile = &OpenFileAsArray("$vars_config{NonCGIPath}/shops/shoplist.cgi");

foreach $thisline(@datafile) {
	chomp($thisline);
	if ($thisline ne '') {
			@linearray = split(/\|\|/,$thisline);
			##output it if active shop
			if ($linearray[6]=1) {
				## weed out shop type for each column
				if ($linearray[1] == "0") {
					# we have a pit shop
					$pshops .= "<br><b><a href=\"$linearray[3]\">$linearray[2]</a></b><br>\n";
					$pshops .= "<br><a href=\"$linearray[3]\"><img src=\"http://dragboatalley.com/shops/$linearray[4]\" border=\"1\" alt=\"Click Here to visit this Shop\"</a><br><br><br>\n";
				} else {
					# we have a featured shop
					$fshops .= "<br><b><a target=\"_blank\" href=\"$linearray[3]\">$linearray[2]</a></b><br>\n";
					$fshops .= "<br><a target=\"_blank\" href=\"$linearray[3]\"><img src=\"http://dragboatalley.com/shops/$linearray[4]\" border=\"1\" alt=\"Click Here to visit this Shop\"</a><br><br><br>\n";
				}
			}
	}
}


as-is, it dumps all shops on one page not matter what page requested. The only thing i did with the page handling vars was page number links at bottom of index.
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311299 - 08/16/06 11:07 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
I believe Ian (and LK and Burak smile ) helped me with a pagination routine in the links script, you might check that out smile
_________________________
- Allen wavey
- What Drives You?

Top
#311301 - 08/16/06 11:39 PM Re: Need Help Finishing Custom Mod [Re: AllenAyres]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
i dont think it's in the links script, but there's pagination in games mods. But the logic is different in those than what i need cuz it loops thru a directory list of files instead of spinning thru a data file. frown
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311312 - 08/18/06 11:51 AM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
ok i got past the above dilema by flat out cheating,
and just setup one datafile per page.

last two hurdles will be wordlets for all my
hardcoded stuff, and admin ability to add/edit
the list shops in a given data file.

anything i need know about settting up a
vars_wordlets_shops.cgi? if i do it just like other mods,
will it automatically appear in control panel for me? TIA!

_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311313 - 08/18/06 11:26 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
yes, you might check out the vars_wordlets_mods modification - it will give you all the inside stuff to get your new file to appear in the cp smile
_________________________
- Allen wavey
- What Drives You?

Top
#311317 - 08/20/06 12:56 PM Re: Need Help Finishing Custom Mod [Re: AllenAyres]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
ok does this look right?

Code:
%vars_wordlets_shops = (
    q!shops_datafileprefix! => q!/shops/!,
    q!shops_pages! => 1,
  );
1;


I need the second var to be a number... do i store it like this, or still wrapped in q!! syntax? tks!!!!
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311321 - 08/20/06 08:59 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
You'll need to wrap the numbers, but yes, that's how you do it smile
_________________________
- Allen wavey
- What Drives You?

Top
#311327 - 08/22/06 08:46 AM Re: Need Help Finishing Custom Mod [Re: AllenAyres]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
thank you Allen for all your help, I'm nearly finished! Only
major thing i have left is save handling on add new shop record
to a datafile.

But since I took the easy way out and split stuff into multiple
datafiles for each page in my shopping mall index, and I control
the number of pages in the index with a var in my wordlets
file... I'm wondering how hard it is to have an html form
where admin user can change the number of pages and update the wordlet var?

I've been digging for an example somewhere of how
to write out an update to a wordlet value but struck out frown
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311331 - 08/22/06 09:55 PM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
RoxSeibert Offline
Member

Registered: 02/20/03
Posts: 178
Loc: highspire, pa
scratch last question, i just moved page count var to it's own datafile and made life easier smile

good grief - i'm finally done! thanks again for your help Allen
_________________________
~=Rox
http://dragboatalley.com/cgi-bin/ultimatebb.cgi

dangerously inspired by ubbdev,
but i still absolutely HATE perl.

Top
#311332 - 08/23/06 09:46 AM Re: Need Help Finishing Custom Mod [Re: RoxSeibert]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
I didn't do much, but you are welcome smile
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  Gizmo 
Who's Online
1 registered (arentzen), 26 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
nick1, Begbie, cenk, MATTO, DougMMcts
13362 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks