| |
|
|
try
{
GupShup.html.util.showElement("adModule1",false);
GupShup.html.util.overlay(document.getElementById("adModuleholder1_RIGHT"),document.getElementById("adModule1"),"left", 0, 0);
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process ad module 1 : error-' + error);
}
/* To create a template pplaceholder map.
* 1. Create a top level object template.
* 2. This top level object contains an array with one entry for each placeholder in the template
* 3. Each entry for a placeholder has two members:
* - tmplKey: Identifies the regular expression used in the template
* - tmplMap: Identifies the member object in the JSON object which should replace the template placeholder.
*/
function getTmplPlaceHolderMap()
{
var placeHolderMap = new Array();
placeHolderMap[0] = new Object();
placeHolderMap[0].key = "http://resource2.smsgupshup.com/webimages/$PIC_POST_URL$.jpg";
placeHolderMap[0].dataMember = "picHREF";
placeHolderMap[1] = new Object();
placeHolderMap[1].key = "http://resource2.smsgupshup.com/webimages/$PIC_IMAGE_URL$.jpg";
placeHolderMap[1].dataMember = "picSrc";
return placeHolderMap;
}
function getLeftTmplDataObjects(picListJson)
{
var picList = picListJson.smsRichContent;
/* We show first half of the categories in the left list. */
var limit = ((picList.length < 4)? picList.length : 4);
limit = Math.floor((limit + 1) / 2);
var picLeftArr = new Array();
for(var i=0; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
picLeftArr[i] = entry;
}
return picLeftArr;
}
function getRightTmplDataObjects(picListJson)
{
var picList = picListJson.smsRichContent;
/* We show second half of the categories in the right list. */
var limit = ((picList.length < 4)? picList.length : 4);
start = Math.floor((limit + 1) / 2);
var picRightArr = new Array();
var j=0;
for(var i = start; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
picRightArr[j++] = entry;
}
return picRightArr;
}
function picSmsPromotionJsp_process()
{
var picListJson = '{"catId":-1,"title":"All","params":{"limit":4,"start":0,"catId":"-1","type":"SMS_RICH_CONTENT_LIST","richContentType":"IMAGE","orderBy":"cost","needTotalForPg":false},"message":"","richContentType":"IMAGE","status":"SUCCESS","smsRichContent":[{"text":"Sorry&#44;galti se mistake ho gaya","title":"sorry","description":"cute sorry","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB223.png","cost":"7.00","contentType":"IMAGE","id":223},{"text":"Taj nahin&#44; par chaahat to hai","title":"Taj","description":"Taj Mahal","url":"http://resource.smsgupshup.com/webimages/picimages/WEB230.png","cost":"7.00","contentType":"IMAGE","id":230},{"text":"Were u looking 4 Mr&#46;Perfect&#63;","title":"knock","description":"Mr Perfect","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB231.png","cost":"7.00","contentType":"IMAGE","id":231},{"text":"ooooh&#33; Hot legs&#46;&#46;&#33;","title":"legs","description":"Hot legs","url":"http://resource.smsgupshup.com/webimages/picimages/WEB232.png","cost":"7.00","contentType":"IMAGE","id":232}],"errorCode":"NO_ERROR","urchinUrl":"/gallery?catId=-1IMAGE&page=1"}';
if (GupShup.util.isInitialized(GupShup.conf.currentModule))
{
if (GupShup.util.trim(GupShup.conf.currentModule.refreshUrl) == '')
{
GupShup.conf.currentModule.refreshUrl
= GupShup.conf.readUrl + "&type=" + 'SMS_RICH_CONTENT_LIST'
+ '&catId=' + '-1'
+ '&start=0' + '&limit=' + '4' + '&needTotalForPg=false';
}
else
{
picListJson = GupShup.conf.currentModule.refreshArgs;
}
}
var picList = GupShup.util.getJsonFromResponse(picListJson);
if((typeof(picList.status) != 'undefined') && (picList.status == 'SUCCESS') && (picList.smsRichContent.length > 0))
{
var tmplPlaceHolderMap = getTmplPlaceHolderMap();
var tmplDataObjArr = getLeftTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("picListLeftTableRIGHT", "picListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
tmplDataObjArr = getRightTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("picListRightTableRIGHT", "picListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
}
}
try
{
picSmsPromotionJsp_process();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process picSmsPromotionJsp module : error-' + error);
}
Premium Groups
Premium Groups allow group owners to earn revenues from publishing content on SMS GupShup. Learn more
Business Groups
Some publishers who have their own businesses, such as stock brokers, have requested a faster SMS service that they can use to send unlimited messages. Learn more
Advertise with us
Reach the audience you want with relevant targetted ads.
Promote your brand and engage with your customers.
Learn more.
try
{
GupShup.html.util.showElement("adModule2",false);
GupShup.html.util.overlay(document.getElementById("adModuleholder2_RIGHT"),document.getElementById("adModule2"),"left", 0, 0);
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process ad module 2 : error-' + error);
}
var innerScriptDiv = "";
var innerScriptText = "";
var orientation = "RIGHT";
var modules = GupShup.conf[orientation + '_Modules'] = new Array();
GupShup.conf.currentModule = modules[0] = {name : 'errorMsg.jsp', rank : 0,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('errorMsg.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[1] = {name : 'whatsNew.jsp', rank : 1,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('whatsNew.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[2] = {name : 'adModule1.jsp', rank : 2,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('adModule1.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[3] = {name : 'picSmsPromotion.jsp', rank : 3,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('picSmsPromotion.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[4] = {name : 'premiumDef.jsp', rank : 4,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('premiumDef.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[5] = {name : 'businessDef.jsp', rank : 5,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('businessDef.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[6] = {name : 'advertiseWithUs.jsp', rank : 6,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('advertiseWithUs.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[7] = {name : 'adModule2.jsp', rank : 7,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('adModule2.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = null;
|
|