CGFeedback reports wrong page id and URl (previous page)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 249
Joined: Sun Oct 28, 2007 4:14 am

CGFeedback reports wrong page id and URl (previous page)

Post by Andrew Prior »

What I think happens.

A reader comes to a webpage on my site because they are clicking on, or pasting in, a link from my newsletter or from another site which lists many of my posts. They make a comment and this shows up in CGFeedback in the normal way. The $page_id and the Original URL: are correct. This happens in the majority of cases, and I can approve the comment, and reply if needed.

But in a number of cases the the $page_id and the Original URL are incorrect, and I have no real idea what page their comment refers to. (The site has over 1600 pages).

Because of what I have observed happening to me when I reply to comments, I think this second situation occurs when they have been browsing the site and then after one or more pages they decide to comment on the page they are currently reading. But the $page_id and the Original URL: refer not to the comment page, but to a previous page they have been visiting.

***What happens for me when testing

What happens for me is that if go directly to the page where they made the comment, make a reply, then the $page_id and the Original URL seem to be correct.

But if I am already on the site browsing myself, and go to reply to the comment, the $page_id and the Original URL will relate to one of the previous pages I have browsed. In this case I know where the comment should be and can correct the table in phpMyAdmin. But I have a number of comments from users which I have not been able to determine the page they were commenting upon.

****What I have done.

Currently I have made an awful kluge to get around this by adding a text field to the feedback form and altering this template: CGFeedback Sample Comment Form so that it adds the $page_alias to the field. NOTE. This field seems to yield the correct value for $page_alias even though the $page_id and the Original URL field are incorrect. Go figure. The kluge means that I cannot add any other fields because they too will have the $page_alias value. But at least i know where the comment has come from!

****Demonstration with debug turned on

So, here is a sequence of what happens, with $config['debug'] = true; in my config.php.

TEST ONE: I go to the page onemansweb.org/download.html to add a comment as soon as I open my browser. This page has a very simple template, which lowers the debug feedback;

I do find in the log below [Debug Log 1] the following, the relevance of which I am uncertain because the comment is not yet published:

Code: Select all

Debug: (0.47342) - (net usage: 21095144) - (peak: 21555416)
SELECT SQL_CALC_FOUND_ROWS com.* FROM cms_module_cgfeedback_comments com WHERE key1 = '__page__' AND key2 = '1447' AND status = 'published' ORDER BY created ASC LIMIT 0, 10000
Certainly the key 2 =1447 is correct about the page id, and CGFeedback reports that the URL is https://www.onetheadminfolder.org/download.html, which is correct.

STEP TWO: Now I will close the browser, and reopen it to another page first off. In this test, I'll use the page below:
https://www.onetheadminfolder.org/easte ... 19-29.html

This data I have placed in STEPTWODEBUG.txt
It is a f****humungous log, I assume because of the menu on the right side of that page. But I find that it has the following:

Code: Select all

Debug display of 'CMSModuleDbTemplateResource endCGFeedback;CGFeedback Sample Comment Form':(0.742907) - (net usage: 50997280) - (peak: 53266792)
Debug: (0.762603) - (net usage: 51283040) - (peak: 53266792)
SELECT SQL_CALC_FOUND_ROWS com.* FROM cms_module_cgfeedback_comments com WHERE key1 = '__page__' AND key2 = '1432' AND status = 'published' ORDER BY created ASC LIMIT 0, 10000
This is indeed the correct key 2, ie page_id for the
https://www.onetheadminfolder.org/easte ... 19-29.html but of course I am not adding a comment here. I just happen to have been reading this page.

STEP THREE: Now I will go to the download page we were at before and make a comment. I will post this result as Debug log 3. There is a short extract from it immediately below this text.

What I find in that log is this, where the page id and the URL are both wrong. They are from the previous page, not the download page. (1432, and 'https://www.onetheadminfolder.org/easte ... 19-29.html')

When I go into CGFeedback, this is born out by the admin interface. Both values relate to the previous page. But the $page_alias that I have kluged into the form is correct.

I am a writer, not a web developer. Does anyone have any idea what it going on?

Log extract for STEP THREE:

Code: Select all

SELECT * FROM cms_module_cgfeedback_fielddefs ORDER BY iorder
Debug: (1.634947) - (net usage: 19999936) - (peak: 20730072)
INSERT INTO cms_module_cgfeedback_comments
              (key1,key2,key3,rating,title,data,status,author_name,author_email,author_ip,author_notify,admin_notes,notified,origurl,extra,created,modified)
              VALUES ('__page__','1432',NULL,5,'Feedback at download after Easter in the Anthropocene','The check box below is correct; we are at the download page. But what will this page say when I send in the comment?','draft','andrew','andrew@andrewprior.com','49.178.17.52',NULL,NULL,NULL,'https://www.onetheadminfolder.org/easter-in-the-anthropocene-john-20-19-29.html','a:1:{s:7:\"feu_uid\";N;}','2019-06-30 18:38:23','2019-06-30 18:38:23')
Debug: (1.635536) - (net usage: 19999752) - (peak: 20730072)
INSERT INTO cms_module_cgfeedback_fieldvals
              (comment_id,field_id,value) VALUES (982,2,'download')
Debug display of 'CMSModuleDbTemplateResource startCGFeedback;notification_template':(1.637563) - (net usage: 20027448) - (peak: 20730072)
Debug: (1.639784) - (net usage: 20029928) - (peak: 20730072)
SELECT * from cms_module_templates WHERE module_name = 'CGFeedback' and template_name = 'notification_template' LIMIT  1
I have placed the full log in STEPTHREEDEBUG.txt

Code: Select all

Cms Version: 2.2.10
Installed Modules:
•	AceEditor2: 1.05
•	AdminSearch: 1.0.4
•	Album: 1.11
•	CGActionBar: 1.1.3
•	CGExtensions: 1.63.2
•	CGFeedback: 2.2.3
•	CGJobMgr: 1.3.6
•	CGSimpleSmarty: 2.2.1
•	CMSContentManager: 1.1.7
•	CMSMailer: 6.2.14
•	Captcha: 1.0
•	CmsJobManager: 0.1.3
•	DesignManager: 1.1.6
•	FileManager: 1.6.8
•	FilePicker: 1.0.4
•	JQueryTools: 1.4.2
•	MenuManager: 1.50.3
•	MicroTiny: 2.2.4
•	ModuleManager: 2.1.6
•	NMS: 2.13.3
•	Navigator: 1.0.9
•	News: 2.51.5
•	Printing: 1.1.2
•	Search: 1.51.6
•	Showtime2: 3.6.3
•	ThemeManager: 1.1.8
•	nuSOAP: 1.0.2

Config Information:
•	php_memory_limit: 
•	max_upload_size: 2000000 
•	url_rewriting: mod_rewrite 
•	page_extension: .html 
•	query_var: page 
•	auto_alias_content: true 
•	locale: 
•	set_names: false 
•	timezone: Australia/Brisbane 
•	permissive_smarty: true 

Php Information:
•	phpversion: 7.3.6 
•	md5_function: On (True) 
•	json_function: On (True) 
•	gd_version: 2 
•	tempnam_function: On (True) 
•	magic_quotes_runtime: Off (False) 
•	E_ALL: 32767 
•	E_STRICT: 2048 
•	E_DEPRECATED: 8192 
•	test_file_timedifference: No time difference found 
•	test_db_timedifference: No time difference found 
•	create_dir_and_file: 1 
•	memory_limit: 128M 
•	max_execution_time: 30 
•	register_globals: Off (False) 
•	output_buffering: 4096 
•	disable_functions: 
•	open_basedir: 
•	test_remote_url: Success 
•	file_uploads: On (True) 
•	post_max_size: 8M 
•	upload_max_filesize: 2M 
•	session_save_path: /opt/alt/php73/var/lib/php/session (0700) 
•	session_use_cookies: On (True) 
•	xml_function: On (True) 
•	xmlreader_class: On (True) 
•	check_ini_set: On (True) 
•	curl: On 

Performance Information:
•	allow_browser_cache: Off (False) 
•	browser_cache_expiry: 30 
•	php_opcache: Off (False) 
•	smarty_cache: Off (False) 
•	smarty_compilecheck: Off (False) 
•	auto_clear_cache_age: On (True) 
Server Information:
•	Server Software: Apache 
•	Server Api: cgi-fcgi 
•	Server Os: Linux 3.10.0-962.3.2.lve1.5.25.6.el7.x86_64 On x86_64 
•	Server Db Type: MySQL (mysqli) 
•	Server Db Version: 5.6.44 
•	Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable 

Permission Information:
•	tmp: /home/MYADMINUSER/public_html/tmp (0755) 
•	tmp_cache: /home/ MYADMINUSER/public_html/tmp/cache (0755) 
•	templates_c: /home/theadminfolder/public_html/tmp/templates_c (0755) 
•	modules: /home/ MYADMINUSER/public_html/modules (0755) 
•	uploads: /home/ MYADMINUSER/public_html/uploads (0775) 
•	File Creation Mask (umask): /home/ MYADMINUSER/public_html/tmp/cache (0755) 
•	config_file: 0444 
----------------------------------------------
STEP ONE DEBUG

Code: Select all

Time: 0.57784 / SQL: 0.12485s for 30 queries / Net Memory: 21746160 / Peak: 22225248
Debug: (0.017276) - (net usage: 972296) - (peak: 1598152)
Initialize Database
Debug: (0.025289) - (net usage: 1163256) - (peak: 1638392)
Done Initializing Database
Debug: (0.025449) - (net usage: 1163416) - (peak: 1638392)
initialize internal global cache
Debug: (0.059176) - (net usage: 5633368) - (peak: 7302704)
done initializing global cache
Debug: (0.059311) - (net usage: 5632832) - (peak: 7302704)
Loading Modules
Debug: (0.085084) - (net usage: 8002720) - (peak: 8686832)
SET @CG_ZEROTIME = NOW() - INTERVAL 150 YEAR,@CG_FUTURETIME = NOW() + INTERVAL 5 YEAR
Debug: (0.104715) - (net usage: 9563896) - (peak: 10368000)
End of Loading Modules
Debug: (0.105302) - (net usage: 9579576) - (peak: 10368000)
Initialize Smarty
Debug: (0.105323) - (net usage: 9579736) - (peak: 10368000)
Done Initialing Smarty
Debug: (0.106521) - (net usage: 9604144) - (peak: 10368000)
cms_content_cache: begin load needed content objects
Debug: (0.108081) - (net usage: 9622328) - (peak: 10368000)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (1447) AND active = 1 ORDER BY hierarchy
Debug: (0.120093) - (net usage: 10067632) - (peak: 10790784)
cms_content_cache: end loading needed content objects
Debug: (0.151286) - (net usage: 14056192) - (peak: 15461496)
SELECT tpl_id,design_id FROM cms_layout_design_tplassoc
                   WHERE tpl_id IN (70,44,41,98,96,93,11) ORDER BY tpl_id
Debug: (0.152356) - (net usage: 14057808) - (peak: 15461496)
SELECT * FROM cms_layout_templates WHERE id IN (70,44,41,98,96,93,11)
Debug: (0.156045) - (net usage: 14165552) - (peak: 15461496)
SELECT * FROM cms_layout_tpl_type WHERE id IN (4,5,37,35)
Debug: (0.164282) - (net usage: 13769320) - (peak: 15461496)
process template top
Debug: (0.198515) - (net usage: 15229880) - (peak: 16633432)
SELECT * FROM cms_content_props WHERE content_id = 1447
Debug display of 'Start Load Smarty Plugin Navigator/function':(0.20451) - (net usage: 15257416) - (peak: 16633432)
Debug: (0.206271) - (net usage: 15286560) - (peak: 16633432)
SELECT * FROM cms_module_smarty_plugins ORDER BY module
Debug display of 'Start Load Smarty Plugin nav_breadcrumbs/function':(0.211124) - (net usage: 15357256) - (peak: 16633432)
Debug: (0.2222) - (net usage: 15481464) - (peak: 16633432)
SELECT * FROM cms_headers ORDER BY RAND() LIMIT 0,1
Debug: (0.224318) - (net usage: 15526464) - (peak: 16633432)
Start Navigator default action
Debug: (0.2283) - (net usage: 15553160) - (peak: 16633432)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (552,1448,59,134,176,599,544,1157,1203,1465) AND active = 1 ORDER BY hierarchy
Debug: (0.235545) - (net usage: 15589312) - (peak: 16633432)
SELECT * FROM cms_content_props WHERE content_id IN (552,1448,59,134,176,599,544,1157,1203,1465) ORDER BY content_id
Debug: (0.242657) - (net usage: 15857712) - (peak: 16633432)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (51,53,667,626,1214,1284,1360,1367,54) AND active = 1 ORDER BY hierarchy
Debug: (0.245774) - (net usage: 15879696) - (peak: 16633432)
SELECT * FROM cms_content_props WHERE content_id IN (51,626,1214,1284,1360,1367) ORDER BY content_id
Debug: (0.257663) - (net usage: 16012840) - (peak: 16633432)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (60,64,82,84,87,104,108,110,123,66,153,1895,145,116,150,171,165,154,181,543,157,676,542,631,886,610,913,550,642,592,843,950,553,563,1006,1021,1144,1150,1188,1295,1300,1307,1308,1314,1329,1334,1368,620,1401,1419,1516,1677,1693,1700,1709,1718,1770,1773,1808,1809,1815,1827,1830,1834,1846,1848,1806,1896,1897,1917,1936,1943) AND active = 1 ORDER BY hierarchy
Debug: (0.297101) - (net usage: 16278672) - (peak: 16724000)
SELECT * FROM cms_content_props WHERE content_id IN (60,64,82,84,87,104,108,110,123,66,153,1895,145,116,150,171,165,154,181,543,157,676,542,631,886,610,913,550,642,592,843,950,553,563,1006,1021,1144,1150,1188,1295,1300,1307,1308,1314,1329,1334,1368,620,1401,1419,1516,1677,1693,1700,1709,1718,1770,1773,1808,1809,1815,1827,1830,1834,1846,1848,1806,1896,1897,1917,1936,1943) ORDER BY content_id
Debug: (0.331924) - (net usage: 17866896) - (peak: 18562992)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (432,435,437,438,462,452,449,441,450,468,461,453,447,436,460,465,470,471,467,443,451,445,217,455,440,466,446,439,464,444,448,454,459,457,463,135,191,469,458,1083,1082,1105,1106,1107) AND active = 1 ORDER BY hierarchy
Debug: (0.346744) - (net usage: 18024368) - (peak: 18562992)
SELECT * FROM cms_content_props WHERE content_id IN (432,435,437,438,462,452,449,441,450,468,461,453,447,436,460,465,470,471,467,443,451,445,217,455,440,466,446,439,464,444,448,454,459,457,463,135,191,469,458,1083,1082,1105,1106,1107) ORDER BY content_id
Debug: (0.362288) - (net usage: 18892176) - (peak: 19478560)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (175,524,525,174,177,523,348,938,923,898,895,836,813,810,809) AND active = 1 ORDER BY hierarchy
Debug: (0.366958) - (net usage: 18945208) - (peak: 19478560)
SELECT * FROM cms_content_props WHERE content_id IN (175,524,525,174,177,523,348,938,923,898,895,836,813,810,809) ORDER BY content_id
Debug: (0.37647) - (net usage: 19216984) - (peak: 19721464)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (349,965,963,883,878,874,871,867,864,857,854,837,828,824,821,816,798,793,791,784,782,768,731,729,722,716,704,370,427,687,678,674,688,664,663,644,637,640,707,699,748,690,995,1040,1124,1180,1205,1206,1207,1220,1222,1228,1244,1246,1255,1283,1286,1288,1762,1463,1466,1579) AND active = 1 ORDER BY hierarchy
Debug: (0.396046) - (net usage: 19440736) - (peak: 19886064)
SELECT * FROM cms_content_props WHERE content_id IN (349,965,963,883,878,874,871,867,864,857,854,837,828,824,821,816,798,793,791,784,782,768,731,729,722,716,704,370,427,687,678,674,688,664,663,644,637,640,707,699,748,690,995,1040,1124,1180,1205,1206,1207,1220,1222,1228,1244,1246,1255,1283,1286,1288,1762,1463,1466,1579) ORDER BY content_id
Debug: (0.417074) - (net usage: 20616104) - (peak: 21302520)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (1387,1386,1388,1389) AND active = 1 ORDER BY hierarchy
Debug: (0.419173) - (net usage: 20631240) - (peak: 21302520)
SELECT * FROM cms_content_props WHERE content_id IN (1387,1386,1388,1389) ORDER BY content_id
Debug: (0.447485) - (net usage: 20898224) - (peak: 21383840)
End Navigator default action
Debug: (0.448384) - (net usage: 20871608) - (peak: 21383840)
Start Navigator breadcrumbs action
Debug: (0.45071) - (net usage: 20904024) - (peak: 21383840)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (53,667,54) AND active = 1 ORDER BY hierarchy
Debug: (0.460023) - (net usage: 20923696) - (peak: 21442088)
End Navigator breadcrumbs action
Debug: (0.47342) - (net usage: 21095144) - (peak: 21555416)
SELECT SQL_CALC_FOUND_ROWS com.* FROM cms_module_cgfeedback_comments com WHERE key1 = '__page__' AND key2 = '1447' AND status = 'published' ORDER BY created ASC LIMIT 0, 10000
Debug: (0.473755) - (net usage: 21094440) - (peak: 21555416)
SELECT FOUND_ROWS() LIMIT  1
Debug display of 'CMSModuleDbTemplateResource startCGFeedback;CGFeedback Summary View':(0.476347) - (net usage: 21115424) - (peak: 21582800)
Debug: (0.477618) - (net usage: 21117904) - (peak: 21582800)
SELECT * from cms_module_templates WHERE module_name = 'CGFeedback' and template_name = 'CGFeedback Summary View' LIMIT  1
Debug display of 'CMSModuleDbTemplateResource endCGFeedback;CGFeedback Summary View':(0.477892) - (net usage: 21116824) - (peak: 21582800)
Debug: (0.499341) - (net usage: 21219128) - (peak: 21708752)
Nothing is known about FrontEndUsers... cant load it
Debug: (0.504382) - (net usage: 21296680) - (peak: 21802096)
SELECT * FROM cms_module_cgfeedback_fielddefs ORDER BY iorder
Debug display of 'CMSModuleDbTemplateResource startCGFeedback;CGFeedback Sample Comment Form':(0.504742) - (net usage: 21306560) - (peak: 21802096)
Debug: (0.505455) - (net usage: 21309072) - (peak: 21802096)
SELECT * from cms_module_templates WHERE module_name = 'CGFeedback' and template_name = 'CGFeedback Sample Comment Form' LIMIT  1
Debug display of 'CMSModuleDbTemplateResource endCGFeedback;CGFeedback Sample Comment Form':(0.50555) - (net usage: 21308008) - (peak: 21802096)
Debug: (0.550572) - (net usage: 21441664) - (peak: 22040736)
Start Navigator default action
Debug: (0.553374) - (net usage: 21401248) - (peak: 22040736)
SELECT * FROM cms_rightpics ORDER BY RAND() LIMIT 0,1
Debug: (0.573309) - (net usage: 21624224) - (peak: 22182760)
SELECT SQL_CALC_FOUND_ROWS S.id FROM cms_layout_stylesheets S LEFT JOIN cms_layout_design_cssassoc D ON S.id = D.css_id WHERE D.design_id = 16 ORDER BY D.item_order ASC LIMIT 0, 1000
Debug: (0.573668) - (net usage: 21625352) - (peak: 22182760)
SELECT FOUND_ROWS() LIMIT  1
Debug: (0.574627) - (net usage: 21625840) - (peak: 22182760)
SELECT id,name,content,description,media_type,media_query,created,modified FROM cms_layout_stylesheets WHERE id IN (3,18,9,19,12)
Debug: (0.575314) - (net usage: 21707552) - (peak: 22182760)
calling module Showtime2 from event ContentPostRender
Debug: (0.577023) - (net usage: 21755984) - (peak: 22225248)
calling module CGActionBar from event ContentPostRender
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGFeedback reports wrong page id and URl (previous page)

Post by calguy1000 »

Thanks for providing detailed information.

Are you calling CGFeedback from the page template, or from the individual content blocks in pages?

Can you paste exactly how you are calling CGFeedback and possibly a bit of the surrounding html.... in case there's anything special going on there.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Andrew Prior
Forum Members
Forum Members
Posts: 249
Joined: Sun Oct 28, 2007 4:14 am

Re: CGFeedback reports wrong page id and URl (previous page)

Post by Andrew Prior »

Calguy, thank you.

The call is from the page template. I have put the following material below:
1. The vanilla test template on the download page... this has no side menus and no search box. You will see the possible relevance of the search box in a moment.

2. The template which calls CGFeedback in the vast majority of cases. This template also includes my search box.

3. The CGFeedback global content block

4. The search global content block. The reason I include this is that the jquery toggle it uses was what I was also using for CGFeedback. When I was doing that, the Originating URL was often reported as being "https://www.onemansweb.org/modules/JQue ... mgs/bg.gif" which is a not existent file on my site. Indeed, even the imgs folder does not exist.

So in my original testing I removed all the jquery references, and I tested with the comment form always visible at the base of the page.

The result was that the Original URL was always reported as matching the page id, even though they were both wrong as per the original post.

I then used the current global content block for CGFeedback which makes the form visible when you click the link. The page Id error persisted, but there was no reference to the non existent bg.gif being the Original URL. So all good.

I then put the search box back in... still all good. So it may be of some interest to you as the developer, but I don't think it's affecting the current results.

1.VANILLA TEMPLATE

Code: Select all

{process_pagedata}<!DOCTYPE html>

<head>
<title>{sitename} - {title}</title>
{metadata}
 <meta name="viewport" content="width=device-width, initial-scale=1" />
{cms_stylesheet}

</head>
</__body>


<div class="container">
    
    <div class="row">
        <div class="twelve columns" style="margin-top: 1%">
        
           {picsheaders}<a id="top"></a>
            <div class="menu_horiz">
              {Navigator number_of_levels=1}<strong></strong>
            </div> <!-- menu -->

        </div> <!-- columns -->
    </div><!-- row -->

    <div class="row">
        <div class="two-thirds column" style="margin-top: 1%">
            <h4 class="title">{title}</h4>
                <div class="hide_on_mobile">
                   <div class="hide_on_mobile"> {nav_breadcrumbs}</div>
                   
                </div> <!-- hide -->
                
                    {content}
                    {global_content name='FeedbackForms'}

        </div> <!-- column -->

        <div class="one-third column" style="margin-top: 10%">
         
            <div class="menu_vert"> <!-- menu -->
            {Navigator start_level="3"  number_of_levels="1"}
            </div> <!-- menu -->
        
            <div class="rightpics"> <!-- rightpics -->
               {skeleton_rightpics}
            </div> <!-- rightpics -->
          
            <div class="clearfix"></div> <!-- clearpix -->
        </div>  <!-- column -->   
    </div> <!-- row -->

    <div class="row">
      <div class="two-thirds column" style="margin-top: 1%">
        
         <div id="search">
                <p></p><a id="search"></a>
              
         </div> <!-- search-->
      </div> <!-- column -->
     </div> <!-- row -->

    <div class="row">
      <div class="twelve columns">
         {global_content name='skeletonfooters'}
      </div> <!-- columns -->
     </div> <!-- row -->
</div> <!-- End Container ––––– -->

<!-- End Document
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
{literal}
<__script__ type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'REDACTED', 'auto');
  ga('send', 'pageview');

</__script>
{/literal}
<__body>
</__html>
2. TYPICAL TEMPLATE

Code: Select all

{process_pagedata}<!DOCTYPE html>

<head>
<title>{sitename} - {title}</title>
{metadata}
 <meta name="viewport" content="width=device-width, initial-scale=1" />
{cms_stylesheet}

</head>
</__body>


<div class="container">
    
    <div class="row">
        <div class="twelve columns" style="margin-top: 1%">
        
           {picsheaders}<a id="top"></a>
            <div class="menu_horiz">
            {Navigator number_of_levels=1}<strong>{global_content name='andrewsearchbox'}</strong>
            </div> <!-- menu -->

        </div> <!-- columns -->
    </div><!-- row -->

    <div class="row">
        <div class="two-thirds column" style="margin-top: 1%">
            <h4 class="title">{title}</h4>
                <div class="hide_on_mobile">
                   <div class="hide_on_mobile"> {nav_breadcrumbs}</div>
                   
                </div> <!-- hide -->
                
                    {content}
                    {global_content name='FeedbackForms'}
        </div> <!-- column -->

        <div class="one-third column" style="margin-top: 10%">
         
            <div class="menu_vert"> <!-- menu -->
          {Navigator start_level="3"  number_of_levels="1"}
            </div> <!-- menu -->
        
            <div class="rightpics"> <!-- rightpics -->
               {skeleton_rightpics}
            </div> <!-- rightpics -->
          
            <div class="clearfix"></div> <!-- clearpix -->
        </div>  <!-- column -->   
    </div> <!-- row -->

    <div class="row">
      <div class="two-thirds column" style="margin-top: 1%">
        
         <div id="search">
                <p></p><a id="search"></a>
                {google_search}
         </div> <!-- search-->
      </div> <!-- column -->
     </div> <!-- row -->

    <div class="row">
      <div class="twelve columns">
         {global_content name='skeletonfooters'}
      </div> <!-- columns -->
     </div> <!-- row -->
</div> <!-- End Container ––––– -->

<!-- End Document
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
{literal}
<__script__ type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'REDACTED', 'auto');
  ga('send', 'pageview');

</__script>
{/literal}
<__body>
</__html>
3. CONTENT BLOCK FOR CGFEEDBACK

Code: Select all

<p> <br /><b>Would you like to comment?</b><br/>
<__script__ type="text/javascript">
<!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
//-->
</__script>
<a href="javascript:toggle_visibility('foo');">Click to add feedback</a>
<div id="foo" style="background-color: #dae8ec; padding: 5px 10px; display: none;">{CGFeedback}</div>
{CGFeedback action='summary' sortorder="ASC"}
4. SEARCH BOX TOGGLE

Code: Select all

<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></__script>
<__script__ type="text/javascript">// <![CDATA[
function toggleDiv(divId) {
   $("#"+divId).toggle();
}
// ]]></__script>
<a style="background-color: rgba(255, 255, 255, 255); padding: 5px 10px; font-weight: bold;" href="javascript:toggleDiv('myContent');">Search</a>
<div id="myContent"  style="display: none;">{Search}</div>
Post Reply

Return to “Modules/Add-Ons”