{"id":284,"date":"2012-01-12T15:31:28","date_gmt":"2012-01-12T15:31:28","guid":{"rendered":"http:\/\/hexagoneye.com\/?page_id=284"},"modified":"2016-10-02T20:58:25","modified_gmt":"2016-10-02T20:58:25","slug":"flogr-interestingness","status":"publish","type":"page","link":"https:\/\/hexagoneye.com\/?page_id=284","title":{"rendered":"Flogr &#8211; Add Interestingness View"},"content":{"rendered":"<p>To add an Interestingness view to your <a title=\"Flogr\" href=\"http:\/\/code.google.com\/p\/flogr\/\">Flogr<\/a> install it takes 5 Easy steps as demonstrated <a href=\"http:\/\/hexagoneye.com\/hexflogr\/index.php?type=interesting\">here.<\/a><\/p>\n<p>Step 1 &#8211; Edit your \/pages\/photo.php<br \/>\nStep 2 &#8211; Edit your \/admin\/flogr.php<br \/>\nStep 3 &#8211; Edit your \/themes\/blackstripe\/menu.php<br \/>\nStep 4 &#8211; Create \/pages\/interesting.php file<br \/>\nStep 5 &#8211; Create \/themes\/blackstripe\/interesting.php file<\/p>\n<p>You can download a .zip of all the modified files\u00a0<a href=\"http:\/\/www.hexagoneye.com\/wp-content\/uploads\/2012\/01\/flogrinteresting.zip\">flogrinteresting.zip<\/a><\/p>\n<p><strong>Step 1 &#8211; Edit your \/pages\/photo.php<\/strong><br \/>\nRemove<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\"> function get_user_interestingness_photos(\r\n$date = null, $extras = null, $perPage = null, $page = null) {\r\n$p = new Profiler();\r\n$this-&gt;photoList = $this-&gt;phpFlickr-&gt;interestingness_getList(\r\n$date,\r\n$extras ? $extras : FLOGR_PHOTO_EXTRAS,\r\n$perPage ? $perPage : $this-&gt;paramPerPage,\r\n$page ? $page : $this-&gt;paramPage);\r\nreturn $this-&gt;photoList;\r\n}\r\n\r\nfunction user_interestingness_photos(\r\n$date = null, $extras = null, $perPage = null, $page = null) {\r\n$p = new Profiler();\r\necho $this-&gt;get_user_interestingness_photos($date, $extras, $perPage, $page);\r\n}\r\n\r\n <\/pre>\n<p>Relplace with<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction get_user_int_photos(\r\n$userId = null,\r\n$tags = null,\r\n$sort = 'interestingness-desc',\r\n$extras = null,\r\n$perPage = null,\r\n$page = null ) {\r\n$p = new Profiler();\r\n$photoSearchParams = array(\r\n&quot;user_id&quot;=&gt;$userId ? $userId : FLICKR_USER_ID,\r\n&quot;tags&quot;=&gt;$tags ? $tags : $this-&gt;paramTags,\r\n&quot;sort&quot;=&gt;$sort ? $sort : $this-&gt;paramSort,\r\n&quot;extras&quot;=&gt;$extras ? $extras : 'original_format,date_taken,date_upload',\r\n&quot;per_page&quot;=&gt;$perPage ? $perPage : $this-&gt;paramPerPage,\r\n&quot;page&quot;=&gt;$page ? $page : $this-&gt;paramPage);\r\n\r\n$this-&gt;photoList = $this-&gt;phpFlickr-&gt;photos_search( $photoSearchParams );\r\nreturn $this-&gt;photoList;\r\n}\r\n\r\nfunction user_int_photos(\r\n$userId = null,\r\n$tags = null,\r\n$sort = 'interestingness-desc',\r\n$extras = null,\r\n$perPage = null,\r\n$page = null ) {\r\n$p = new Profiler();\r\necho $photos = $this-&gt;get_user_photos($userId, $tags, $sort, $extras, $perPage, $page);\r\n}<\/pre>\n<p><strong>Step 2 &#8211; Edit your \/admin\/flogr.php<\/strong><br \/>\nAdd <code>'interesting' =&gt; 'interesting.php',<\/code> to pageMap array as below<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;\/pre&gt;\r\n&lt;blockquote&gt;&lt;code&gt;\r\nvar $_pageMap = array(\r\n'' =&gt; 'photo.php',\r\n'photo' =&gt; 'photo.php',\r\n'recent' =&gt; 'recent.php',\r\n'interesting' =&gt; 'interesting.php',\r\n'sets' =&gt; 'sets.php',\r\n'tags' =&gt; 'tags.php',\r\n'map' =&gt; 'map.php',\r\n'map_data' =&gt; 'map_data.php',\r\n'favorites' =&gt; 'favorites.php',\r\n'about' =&gt; 'about.php',\r\n'rss' =&gt; 'rss.php'\r\n);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 3 &#8211; Edit your \/themes\/blackstripe\/menu.php<\/strong><br \/>\nAdd<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\"> &lt;a id=&quot;menuitem_interesting&quot; href=&quot;index.php?type=interesting&quot;&gt;Popular Pics&lt;\/a&gt;\u00a0<\/pre>\n<p>As below<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;\/pre&gt;\r\n&lt;blockquote&gt;\r\n&lt;ul&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_home&quot; href=&quot;\/&quot;&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_recent&quot; href=&quot;index.php?type=recent&quot;&gt;Recent&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_interesting&quot; href=&quot;index.php?type=interesting&quot;&gt;Popular Pics&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_sets&quot; href=&quot;index.php?type=sets&quot;&gt;Sets&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_tags&quot; href=&quot;index.php?type=tags&quot;&gt;Tags&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_map&quot; href=&quot;index.php?type=map&quot;&gt;Map&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a id=&quot;menuitem_about&quot; href=&quot;index.php?type=about&quot;&gt;About&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/blockquote&gt;\r\n&lt;pre&gt;\r\n <\/pre>\n<p><strong>Step 4 &#8211; Create \/pages\/interesting.php file<\/strong><\/p>\n<p>Create both these files containing<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\nrequire_once( 'photo.php' );\r\n?&gt;\r\n<\/pre>\n<p><strong>Step 5 &#8211; Create \/themes\/blackstripe\/interesting.php file<\/strong><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n      &lt;div id=&quot;leftcontent&quot;&gt;&lt;\/div&gt;\r\n\r\n      &lt;div id=&quot;centercontent&quot;&gt;\r\n        &lt;div id='page_header'&gt;\r\n          &lt;span id='page_title'&gt;\r\n          \t&lt;?php\r\n          \t\tif ( $photo-&gt;paramTags ) {\r\n          \t\t\techo $photo-&gt;paramTags;\r\n          \t\t} else {\r\n          \t\t\techo &quot;Interesting&quot;;\r\n          \t\t}\r\n          \t?&gt;\r\n          &lt;\/span&gt;\r\n          &lt;span id='page_nav'&gt;\r\n          \t&lt;?php\r\n          \t\t$photos = $photo-&gt;get_user_int_photos();          \t\r\n          \t\t$photo-&gt;next_page_link($photos, 'prev ') . $photo-&gt;previous_page_link($photos, 'next');\r\n          \t?&gt;\r\n          &lt;\/span&gt;\r\n        &lt;\/div&gt;\r\n\r\n        &lt;div id='page'&gt;\r\n\r\n            &lt;!-- Show the photo and link the photo to the previous photo --&gt;\r\n            &lt;div id='thumbnail_container'&gt;\r\n            \t&lt;?php\r\n            \t\t$photo-&gt;slideshow_thumbnails( $photos );\r\n            \t?&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n      \r\n      &lt;div id=&quot;rightcontent&quot;&gt;&lt;\/div&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To add an Interestingness view to your Flogr install it takes 5 Easy steps as demonstrated here. Step 1 &#8211; Edit your \/pages\/photo.php Step 2 &#8211; Edit your \/admin\/flogr.php Step 3 &#8211; Edit your \/themes\/blackstripe\/menu.php Step 4 &#8211; Create \/pages\/interesting.php &hellip; <a href=\"https:\/\/hexagoneye.com\/?page_id=284\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-284","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hexagoneye.com\/index.php?rest_route=\/wp\/v2\/pages\/284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hexagoneye.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hexagoneye.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hexagoneye.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hexagoneye.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=284"}],"version-history":[{"count":0,"href":"https:\/\/hexagoneye.com\/index.php?rest_route=\/wp\/v2\/pages\/284\/revisions"}],"wp:attachment":[{"href":"https:\/\/hexagoneye.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}