News:

Wondering if this will always be free?  See why free is better.

Main Menu

Adk Portal

Started by lucas-ruroken, March 06, 2010, 06:19:55 AM

Previous topic - Next topic

.Vapor


lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

kb3rcl


kb3rcl

global $adkportal;
$scripturl1= str_replace("/index.php","",$scripturl);
if(!empty($adkportal['enable_pages_seo']))
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?page=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . changeurlpagesAdkportal('\$1'). '\"'", $buffer);
}
$buffer = changeAdkBuffer($buffer);
if(!empty($adkportal['enable_download_seo']))
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=downloads;cat=([^#"]+?);([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/index.php?action=downloads;cat=\$1;\$2\"'", $buffer);
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=downloads;cat=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . changeCatUrl('\$1'). '\"'", $buffer);
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=downloads;sa=view;down=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . changeDownloadUrl('\$1'). '\"'", $buffer);
}

/*Adk Portal End*/


Am I viewing this right?  Is this simply to allow for the ADK SEO aspects of the portal? More specifically, to allow download of such?

My apologies if this is a bit of a nub question.  But if I am correct...well, I don't really need it anyway, lol.

Btw, I have noticed that the Portal installs perfectly on a clean install of SMF 2.0.1 and the FireBrick theme I am using.  I am assuming the errors I received we due to another mod I am using, and changes that were made on it's behalf.  For the Subs.php, I have a feeling it is specifically a mod to remove the Help option that made the changes responsible for the error.

Thinking outloud, more than anything else, lol.  Just trying to get a grasp on all of this.

lucas-ruroken

That modification is necessary.... if you don't use Seo system....you just need disable it in the admin section.

Adk Portal 3.1 is coming....

Design your universe!

fobo

I use SMF 2.0.1 shoutbox and news writing invisible block what's the solution?

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

smartblogz

#667
Hi guys,
I recently uninstalled Adk portal and then I got this error:
Warning: require_once(..../forum/Sources/Subs-adkfunction.php) [function.require-once]: failed to open stream: No such file or directory in ..../forum/index.php on line 55

Fatal error: require_once() [function.require]: Failed opening required '/----/forum/Sources/Subs-adkfunction.php' (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /.../forum/index.php on line 55

Can you guys please help rectify this?

Thanks.

SMF v 2.0.1
Adk 2.0

update: so I removed those lines from the index.php and now I get this error:
Table 'smp_smf_adk_settings' doesn't exist

lucas-ruroken

reupload all files of adkportal... and check the permissions....

upload db_install_adkportal.php to your forum, and execute: www.yourforum.com/db_install_adkportal.php
Adk Portal 3.1 is coming....

Design your universe!

smartblogz

thanks man.
all adk files reuploaded.

where do I get the db_install_adkportal.php file from?

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

frytec

hey lucas, can u help me to install google custom search into a page on adk portal?


smartblogz

Quote from: lucas-ruroken on October 05, 2011, 04:19:14 PM
in the adkportal zip.
thanks....hopefully it will help cos at the moment, forum looks totally screwed up.  :o

lucas-ruroken

Quote from: frytec on October 05, 2011, 05:03:37 PM
hey lucas, can u help me to install google custom search into a page on adk portal?



yep, insert here the script (in [code)

Quote from: smartblogz on October 05, 2011, 05:15:18 PM
Quote from: lucas-ruroken on October 05, 2011, 04:19:14 PM
in the adkportal zip.
thanks....hopefully it will help cos at the moment, forum looks totally screwed up.  :o

perfect!
Adk Portal 3.1 is coming....

Design your universe!

frytec

lucas, i created a page on ADKPortal like /index.php?page=p

and added the code from google on page=p

<div id="cse" style="width: 100%;">Loading</div>
<script src="//www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  function parseQueryFromUrl () {
    var queryParamName = "p";
    var search = window.location.search.substr(1);
    var parts = search.split('&');
    for (var i = 0; i < parts.length; i++) {
      var keyvaluepair = parts[i].split('=');
      if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {
        return decodeURIComponent(keyvaluepair[1].replace(/\+/g, ' '));
      }
    }
    return '';
  }

  google.load('search', '1', {language : 'pt-BR'});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('006414486178176156691:ciri94db3eo');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw('cse');
    var queryFromUrl = parseQueryFromUrl();
    if (queryFromUrl) {
      customSearchControl.execute(queryFromUrl);
    }
  }, true);
</script>
<link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" />


but when i perform a search, it does not load the search and only show "Loading".

any idea?

the site is http://www.detetiveweb.com.br

blazed-d

#675
I'm having a difficult time getting ADK Portal to work with our forum.

We recently updated to the latest SMF Version (2.0.1) which knocked all of the packages out. I cannot uninstall or (re)install any of the older versions of ADK portal. I went to install the latest version of ADK and it had an error on install check:
Find:
'layout' => array(
'title' => $txt['layout_controls'],

Add Before:
'adk_portal' => array(
'title' => !empty($txt['adk_portal']) ? $txt['adk_portal'] : 'Adk Portal',
'permission' => array('adk_portal'),
'areas' => array(
'adkadmin' => array(
'label' => !empty($txt['adk_portal']) ? $txt['adk_portal'] : 'Adk Portal',
'file' => 'Adk-Admin.php',
'function' => 'AdkAdmin',
'icon' => 'label0.png',
'permission' => array('adk_portal'),
'subsections' => array(
'view' => array(!empty($txt['adk_news_news']) ? $txt['adk_news_news'] : 'News'),
'adksettings' => array(!empty($txt['opcion_adk']) ? $txt['opcion_adk'] : 'Settings'),
'manageicons' => array(!empty($txt['adk_manage_icons']) ? $txt['adk_manage_icons'] : 'Icons'),
),
),
'blocks' => array(
'label' => $txt['blocks_settings_admin'],
'file' => 'Adk-Admin.php',
'function' => 'AdkBlocksGeneral',
'icon' => 'posts.gif',
'permission' => array('adk_portal'),
'subsections' => array(
'viewblocks' => array(!empty($txt['bloques']) ? $txt['bloques'] : 'Blocks'),
'settingsblocks' => array($txt['adk_settings_blocks']),
'newblocks' => array(!empty($txt['crear_block']) ? $txt['crear_block'] : 'Create Block'),
'uploadblock' => array(!empty($txt['adk_upload_yourBlock']) ? $txt['adk_upload_yourBlock'] : 'Upload Block'),
'createnews' => array(!empty($txt['nueva_noticia']) ? $txt['nueva_noticia'] : 'Create News'),
'shoutbox' => array(!empty($txt['adk_shout']) ? $txt['adk_shout'] : 'ShoutBox'),
),
),
'modules' => array(
'label' => !empty($txt['adk_modules_admin']) ? $txt['adk_modules_admin'] : 'Modules',
'file' => 'Adk-Modules.php',
'function' => 'AdkModules',
'icon' => 'label1.png',
'permission' => array('adk_portal'),
'subsections' => array(
'intro' => array(!empty($txt['adk_modules_intro']) ? $txt['adk_modules_intro'] : 'Intro'),
'viewadminpages' => array(!empty($txt['adk_admin_pages']) ? $txt['adk_admin_pages'] : 'Pages'),
'uploadanyimage' => array(!empty($txt['advanced_block_images']) ? $txt['advanced_block_images'] : 'Adv Images'),
'manageimagesadk' => array(!empty($txt['adk_manage_images']) ? $txt['adk_manage_images'] : 'Manage images'),
),
),
'adkdownloads' => array(
'label' => 'E. Download System',
'file' => 'Adk-Downloads.php',
'function' => 'ShowDownloadsMainAdmin',
'icon' => 'label2.png',
'subsections' => array(
'settings' => array($txt['adk_settings']),
'addcategory' => array($txt['add_category']),
'allcategories' => array($txt['categories']),
'approvedownloads' => array($txt['adk_approve']),
),
),
'adkseoadmin' => array(
'label' => $txt['seo_manage_title'],
'file' => 'Adk-Seo.php',
'function' => 'AdkSeoMain',
'icon' => 'label3.png',
'subsections' => array(
'htaccess' => array($txt['seo_create_htaccess']),
'settings' => array($txt['adk_settings']),
'robotstxt' => array($txt['seo_create_robotstxt']),
),
),
),
),


Being the web developer I am I opened up Sources/Admin.php and found the code and added it manually and went on with the installation. If I manually did it, I expected it would accept it. Either way after an install with no massive errors I could get to the admin backend (where I had all the default blocks add themselves to my existing blocks). After sorting that out I went to see if it worked and got this error:

Fatal error: Call to undefined function columntop() inSources/Load.php(2169) : eval()'d code on line 18

Doing some debugging I created a few mock functions to see what actions these functions performed. It seems that all 5 functions to load the blocks are missing:
columnbottom()
columntop()
columnleft()
columnright()
columnbottom()


Did I do something wrong and what can I do to get my ADK portal back up (my forum is now exposed :o)


EDIT: I disabled and re-enabled from the options page and it works now :D

lucas-ruroken

@frytect.

Create a new document in your pc... google.html, open it with your editor, and add that code, upload to your site and test.... maybe it's a problem with google....

@blazed

what is your forum url?... and.. what was your previous version of smf?
Adk Portal 3.1 is coming....

Design your universe!

frytec

lucas, on the external page (google.html) it works.

the problem is on adk page, but i cant figure out what...


lucas-ruroken

try creating a php page with the following code... I don't know why it's not working


<?php
echo'
<div id="cse" style="width: 100%;">Loading</div>
<script src="//www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript"> 
  function parseQueryFromUrl () {
    var queryParamName = "p";
    var search = window.location.search.substr(1);
    var parts = search.split(\'&\');
    for (var i = 0; i < parts.length; i++) {
      var keyvaluepair = parts[i].split(\'=\');
      if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {
        return decodeURIComponent(keyvaluepair[1].replace(/\+/g, \' \'));
      }
    }
    return \'\';
  }

  google.load(\'search\', \'1\', {language : \'pt-BR\'});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl(\'006414486178176156691:ciri94db3eo\');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw(\'cse\');
    var queryFromUrl = parseQueryFromUrl();
    if (queryFromUrl) {
      customSearchControl.execute(queryFromUrl);
    }
  }, true);
</script>
<link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" /> '
;

?>

Adk Portal 3.1 is coming....

Design your universe!

piginzen

Quote from: unitman on September 09, 2011, 02:08:01 AM
Does any one know how to turn off collapse columns?  I got all the blocks turned off, but I want to turn off the columns too so no one can collapse them.  Using current versions of SMF and ADK Portal.

I would like to know where these buttons are kept as well.  I have a donations block that I don't want people hiding.

Advertisement: