POST ONCE TO 2 DIFFERENT SECTION EDITORS

34 posts by 4 authors in: Forums > CMS Builder
Last Post: April 5, 2010   (RSS)

By weblinks - March 19, 2010

Hi Donna...

Yes, what you say makes sense.. However, I'm not certain it will work because of how these ads are created, etc. Please... read below and get back to me asap..

1. Understand that these postings are ADS, and THEY ARE NOT POSTED BY ME... THEY ARE POSTED BY INDIVIDUAL ADVERTISERS. When they purchase an ad I send them a Username & Passwork, Login Info, and Instructions...

2. VERY IMPORTANT...[/#ff0000] The advertiser purchases an ad to go on a SPECIFIC PAGE [e.g. Manchester Area Lodging Page [ http://www.linkvermont.com/townsvill/manchesterarea/lodging.htm ] Now... I WANT this ad they have created to appear on a[/#000000] SINGLE VERY SPECFIC PAGE based upon their location... e.g. on our Southern
Vermont Real Estate Page [not created yet] because Manchester is located in Southern Vermont. [/#000000]I DO NOT want them to select Southern Vermont... I want any Manchester Advertiser to[/#000000] AUTOMATICALLY [/#ff0000]appear on the Southern Vermont Lodging Page... as well as any other advertisers from Manchester or other towns listed in Southern Vermont. Other advertisers will AUTOMATICALLY appear on one of the two other Regional Pages when appropriate... Northern or Central Vermont. Note that if I allow the advertiser to select the Northern, Central or Southern pages many will choose the wrong region when they are near a "border"... e.g. Ludlow Vermont could be either Central or Southern.... WE are set up so that they should appear under Central.[/#000000][/#ff0000]

3. IMPORTANT:[/#ff0000] Presently we only have 25 AREA [NOT REGIONAL] PAGES... e.g. Manchester Area, Rutland Area, Northeast Kingdom Area, etc. When the advertiser purchases an ad WE have it set up so that when they login THE ONLY SECTION they can access is the one we designated... eg. Manchester Lodging. WE WOULD LIKE TO KEEP IT THIS WAY IF POSSIBLE... and somehow, just, have this Manchester ad ALSO appear on our Southern Vermont Lodging Page as well??????? IF THIS IS NOT POSSIBLE we could have them select Manchester Area from a checkbox... and, ONLY IF ABSOLUTELY NECESSARY, also choose Southern Vermont via a checkbox?????[/#000000]

If I must go the checkbox route, I presume I will also need to add "If Statements" to the code??? IF SO, PLEASE... GIVE ME AN EXAMPLE OF THIS CODE[/#ff0000]... and, WHAT GOES IN MY VIEWER URL FORM... ???? southernvermont lodging.php???? EQUALLY IMPORTANT, in addition to the "if statements" , what other code is placed on either... or both, of the relative pages? [/#000000]

Donna, I apolgize for the length of this but I am at the end of my rope with this. I have no problem with having an advertiser's input appearing on the correct page... it's HOW[/#ff0000] they appear on this second page I don't understand. I need some specific coding as an example. Because of the weekend, if I can't solve this today I'm up the creek.[/#000000]

Regards,[/#000000]

Bob[/#000000]

[/#000000]

Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By Chris - March 19, 2010 - edited: March 19, 2010

Hi Bob,

Okay, so you're using Section Access to restrict what records your users can add. Forget about combining sections then.

Let me see if I have this right:

1. The Manchester page should display only records from the Manchester section.

2. The Southern Vermont page should display records from the Manchester section, as well as several other sections.

That's easy. You already have 1 working. To get your regional pages working, you'll simply need to add extra getRecords() calls. For example:

list($manchesterRecords, ) = getRecords(array(
'tableName' => 'manchester',
));
list($rutlandRecords, ) = getRecords(array(
'tableName' => 'rutland',
));
list($northeastKingdomRecords, ) = getRecords(array(
'tableName' => 'northeast_kingdom',
));


Then display them all:

<h2>Manchester</h2>
<?php foreach ($manchesterRecords as $record): ?>
<?php echo $record['title'] ?><br/>
<?php endforeach ?>

<h2>Rutland</h2>
<?php foreach ($rutlandRecords as $record): ?>
<?php echo $record['title'] ?><br/>
<?php endforeach ?>

<h2>Northeast Kingdom</h2>
<?php foreach ($northeastKingdomRecords as $record): ?>
<?php echo $record['title'] ?><br/>
<?php endforeach ?>


Does that work?
All the best,
Chris

Re: [chris] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By weblinks - March 20, 2010

Chris... If this works I'll remember you in my will.... However, all you'll probably get is bills!

I think you've got what I've been looking to get for days!!!! HOWEVER, there's always a "However"... I need a clarification.... Please read this entire message first... I may have answered the question myself... at the end

If I understand you correctly... the Manchester Page will have already existed with ads on it generated by different individuals using different Usernames & Passwords given by us after setting each individual up with a Username and Passord..... And now... I am to create a Southern Vermont page with the EXACT SAME CMS CODE AS THAT WHICH IS ON THE MANCHESTER PAGE?????

IF SO, DO I THEN ADD THE CODES TO THE SOUTHERN VERMONT PAGE, WHICH YOU SENT ME BELOW. WHICH ALREADY CARRIES THE MANCHESTER CODE................. This don't seem right because, in essence, I'm adding the code below to the equivalent of the Manchester page [with a different name]?????????????? However, IF this is the case, where to I PLACE the code? IF NOT??????????

In short, I need to know WHAT [ONLY] CODE should appear on the Southern Vermont page IN ADDITION to the codes you sent me? ....[/#ff0000]

In the interest of sanity [mine] do I set up the Southern Vermont Page in the Section Editors and place THAT CODE on the generated page... and then add YOUR CODE... and if so, WHERE on the page????[/#ff0000]

Chris.... I'm sorry about being brain dead when it comes to this, but I've received all sorts of recommendations which didn't seem to be what I was looking for... UNTIL YOU SENT ME THE INFO BELOW.[/#400000]

Re: [chris] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By weblinks - March 24, 2010

Chris....

Note: I have only created two [2] PHP pages where the content must also appear on a REGIONAL PAGE such as a Southern Vermont Lodging page... because I need to know that this will work before I build the other 2 Regional Pages [Northern Vermont Lodging and Central Vermont Lodging] However, the code will be precisely the same except for the name of the php page.

It should help you to know how my site [linkvermont.com] is formated... the "tree".... with regard to my Lodging Pages.

Example:

linkvermont
linkvermont/townsvill/
linkvermont/townsvill/manchesterarea/index.htm
linkvermont/townsvill/manchesterarea/dining.htm
linkvermont/townsvill/manchesterarea/lodging.php [till now, an htm file] [/#ff0000]* NOW online as http://www.linkvermont.com/townsvill/manchesterarea/lodging.php[/#000000]

*Note that I have approximately 25 DIFFERENT AREA PAGES with a lodging.php page... [/#ff0000]e.g /townsvill/weston_londonderry/lodging.php. ... /townsvill/lakechamplainislands/lodging.php, etc[/#000000]

These 25 "lodging.php" pages need to have their content ALSO appear on ONE of the 3 Regional Pages... Northern, Central, Southern... [/#ff0000][/#000000]e.g. /lodging_southern.php ... In other words, the php content from nine [9] AREA PAGES [e.g. manchesterarea] must ALL APPEAR on the /lodging_southern.php page. Note that these Regional Pages WILL BE IN THE ROUTE DIRECTORY... linkvermont... NOT BELOW THE townsvill sub directory.[/#000000]

Equally Important... the contents from the 9 pages must appear in a Random Format... NOT first "manchester content - randomly, then another area randomly, etc.... the total number of postings, regardless of which Area they came from, must appear in Random format. [/#000000]I'm ready for a padded cell !!!

I am ATTACHING a pdf document of the CODE for the http://www.linkvermont.com/townsvill/weston_londonderry/lodging.php page... ALL of the other townsvill/lodging.php pages will be the same, except for the name of the "town". Please show me WHAT CODE appears on WHAT PAGES.. town page vs Regional Page [e.g. southern.....]

Sorry for this detail but I desparately need to get this all done. I really more than appreciate your help.

Bob

P.S. Please give me your email address in case I need to send something I do not wish public.







[/#000000]

[/#000000]


Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By Chris - March 24, 2010

Hi Bob,

the contents from the 9 pages must appear in a Random Format


If all your sections have the same fields, I can show you how to do this.

I am ATTACHING a pdf document of the CODE for the http://www.linkvermont.com/townsvill/weston_londonderry/lodging.php page


Something must have gone wrong because I don't see an attachment. Also, why PDF?

P.S. Please give me your email address in case I need to send something I do not wish public.


You can use the forum's private message feature to send me private messages (they go to my email), but please note that response times will be better for forum posts.
All the best,
Chris

Re: [chris] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By weblinks - March 25, 2010

[font "Times New Roman"]Chris...[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]ATTACHED please find the lodging.php page for the Manchester Area.. which will carry the php code. ALL of the lodging.php pages, each located in a different townsvill directory, are the SAME... e.g. /townsvill/manchesterarea/lodging.php, /townsvill/weston-londonderry/lodging.php, etc...[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]Please remember that the Regional Pages such as /lodging_southernvermont.php WILL BE IN THE ROOT DIRECTORY... NOT in the townsvill directory.[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]Further, please remember that ALL of the posts in the /lodging_southernvermont.php file must be sorted, AND NOT SEPARATELY by what directory they came from.[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]Incidentally... In a Random Sort... does the sorting include all pages.. eg. page 1, page 2, etc.??? In other words, will a posting on page 2, sooner or later appear on Page 1????[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]Chris... Needless to say, I'm hoping you now have all of the info you need.[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]Best,[/#000000]

[font "Times New Roman"] [/#000000]Bob[/#000000]
Attachments:

lodging.zip 6K

Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By Chris - March 29, 2010

Hi Bob,

Can you please list which sections should be displayed on your Southern Vermont regional page?
All the best,
Chris

Re: [chris] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By weblinks - March 30, 2010

[font "Times New Roman"]Chris...[/#000000]

[font "Times New Roman"] [/#000000]

[font "Times New Roman"]PLEASE!!!!! Send me the code I need to accomplish this. [/#000000][font "Times New Roman"]On March 19th... 11 days ago... You said " That's easy. You already have 1 working. To get your regional pages working, you'll simply need to add extra getRecords() calls. For example..." ???????[/#000000]



The first request for info about this was on March 17th... 13 days ago.



I'm listing below the Sections you have now requested. Understand, there will soon be other Sections to be added.... Can't you just give me the code for a few Sections so that I can add Sections at will???? In any event, BELOW please find the info you requested. Please note that WITHIN the Sections ALL fields must be displayed, not just the "title"....



CURRENT SECTIONS ONLINE....



lodging_manchester

lodging_ weston_londonderry

lodging_chester_grafton

lodging_brattleboro_newfane

lodging_bellowsfalls_rockingham

lodging_ bennington_arlington



ADDITIONAL SECTIONS TO BE ADDED AS SOON AS I RECEIVE CODE FROM YOU.....



lodging_springfield

lodging_strattonarea

lodging_mountsnow_wilmington



Chris... Please get back to me today.



Bob

Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS

By Chris - March 30, 2010 - edited: March 30, 2010

Hi Bob,

Try this:

<?php
require_once "/your/path/to/cmsAdmin/lib/viewer_functions.php";

list($lodging_manchesterRecords, ) = getRecords(array( 'tableName' => 'lodging_manchester' ));
list($lodging_weston_londonderryRecords, ) = getRecords(array( 'tableName' => 'lodging_weston_londonderry' ));
list($lodging_chester_graftonRecords, ) = getRecords(array( 'tableName' => 'lodging_chester_grafton' ));
list($lodging_brattleboro_newfaneRecords, ) = getRecords(array( 'tableName' => 'lodging_brattleboro_newfane' ));
list($lodging_bellowsfalls_rockinghamRecords, ) = getRecords(array( 'tableName' => 'lodging_bellowsfalls_rockingham' ));
list($lodging_bennington_arlingtonRecords, ) = getRecords(array( 'tableName' => 'lodging_bennington_arlington' ));

// combine all records collected above into one big list
$southernVermontRecords = array_merge(
$lodging_manchesterRecords,
$lodging_weston_londonderryRecords,
$lodging_chester_graftonRecords,
$lodging_brattleboro_newfaneRecords,
$lodging_bellowsfalls_rockinghamRecords,
$lodging_bennington_arlingtonRecords
);

// shuffle our list so the records are displayed in a random order
shuffle($southernVermontRecords);

// limit to the first 10 records (remove the // on the next line to make this work)
//$southernVermontRecords = array_slice($southernVermontRecords, 0, 10);
?>

<?php foreach($southernVermontRecords as $record): ?>
<?php echo $record['title'] ?><br />
<?php echo $record['town'] ?><br />
<?php echo $record['phone'] ?><br />
<?php echo $record['description'] ?><a href="<?php echo $record['url'] ?>"><?php echo $record['webpage'] ?></a><br />
<!--
Please note: you can copy any or all of the code from your lodging.php page which you attached earlier into this page.
If all the sections above have the same fields, you can use them on this page too.
-->
<hr />
<?php endforeach ?>


Does that work for you? Please let me know if you have any questions.
All the best,
Chris