/    Sign up×
Community /Pin to ProfileBookmark

Dynamic text and links

Hi Everybody! CowGirl is here!

I have two affiliate malls (on different urls – URL A and URL ? that feature the same stores. Currently, each time I add or delete a store I have to modify both URL A and URL B. I would like to use a script so that I do not have to modify both URL A and URL B each time I add/remove a store, and instead can just modify one file(s) published at one location.

(1) What I want to do is have one source file(s) published in one location (ideally on URL C) which lists the store affiliate links and text describing the affiliate store, with this source automatically populating URL A and URL B.

A simplified version of the page in question can be viewed at [url]http://www.14kt.eu/index_2_with_script_x2_externalscript.html[/url] – the page is essentially the same on URL A and URL B. The text that I want to automatically populate is in bold. Ideally, I would like to keep the structure of the page as it is, so that this bold text being automatically populated in between the <ul> and </ul> tags. There is no need for any function sorting the order in which the stores are listed – it is good enough if the stores are listed in the order that they appear in the source file.

2) Each affiliate link that appears on URL A and URL B is the same for both URL A and URL B, except for one part. For example, the affiliate link for Best Buy would appear on URL A and URL B as follows: URL A ([url]http://clickserve.cc-dt.com/link/tplclick?lid=1234&[/url][B]pubid=5678[/B]) and URL B([url]http://clickserve.cc-dt.com/link/tplclick?lid=1234&[/url][B]pubid=9012[/B]) – the only part that changes is the bold text. For example, the affiliate link for Wal-Mart would appear on URL A and URL B as follows: URL A ([url]http://clickserve.cc-dt.com/link/tplclick?lid=8734&[/url][B]pubid=5678[/B]) and URL B([url]http://clickserve.cc-dt.com/link/tplclick?lid=8734&[/url][B]pubid=9012[/B]) – again the only part that changes is the bold text. Thus, the script would also have to modify the affiliate link to account for this.

Please note, this website already uses scripts – see:[url]http://www.14kt.eu/scripts/cowgirl_1.js[/url]

I would be most grateful if somebody can tell me if this is possible, assuming it would not raise any issues/concerns. Doe anybody know a good tutorial explaining how I can do the above?

Thank you and Big Hugs!!!!!!!!!!!
CowGirl

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@CuppyTeaDec 07.2008 — You would be better off using a server side language such as PHP to accomplish this.

If you are sure you want to use client side however, you will need something similar to this.....

URL A = http://google.com - mall1

URL B = http://yahoo.com - mall2

URL C = http://admin.com - Central URL.

You, as an administrator would edit URL C, to maintain the list of stores names, descriptions etc, and would provide it in a format such as JSON or XML.

For the dynamic URL, you would just miss out the bit that is dynamic.

mall1 and mall2 would then use AJAX to query URLC to retrieve a list of the information to display, and would then manipulate the data to display it in the form they want. They would append the dynamic information to the store urls.

Seriously- I cannot stress how much this should be done in a server side language.... You would have a central database which stores the information, and then the two sites which would query the database and display the information.
Copy linkTweet thisAlerts:
@CowGirlauthorDec 08.2008 — CuppyTea,

Thank you for taking the time to respond. Moreover, thank you for pointing out a better way to do things. I will use server side language. Hopefully, server side language will allow me to use dynamic urls.

Big Hugs, CowGirl!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
×

Success!

Help @CowGirl spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...