Jump to content

Imtehbegginer

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Imtehbegginer's Achievements

Member

Member (2/5)

0

Reputation

  1. Actually that's exactly what I needed, for the version check I was using a current_version.txt file but I couldn't figure out an efficient way to update. I will check out WordPress' update system. Thanks.
  2. 28 views and not one reply..... can I atleast know if it's possible?
  3. Hello, I'm developing a script that includes an admincp. I want to know if anyone knows how to make it so when the administrator goes to the update section of the admin cp, it checks the scripts current version and displays the latest version released, then they have an option to install the latest version, using php to release the files needed with a list of files on the update server. Is there any possible way to do this?
  4. Nevermind, I figured it out. Thanks genericnumber1
  5. class wowcms { var $config; function config() { @include('includes/config.php'); $this->config = $config; } function load_template($theme) { require('templates/'.$theme.'/header.tpl'); require('templates/'.$theme.'/index.tpl'); require('templates/'.$theme.'/footer.tpl'); } function show_error($text) { echo($text); } function fatal_error($text) { die($text); } } There is my system.php. Now on my index I use $wowcms = new wowcms; then i require my template blah blah. Now on the template I do $wowcms->show_error('whatever'); nothing shows up. Can you show me an example of what you mean?
  6. I have a system.php file with a class called wowcms. In wowcms there is a function called show_error($error); So on my index.php page I include it and do $wowcms = new wowcms; I also have a template function that includes the header.tpl, index.tpl, and footer.tpl. But when I do a $wowcms->show_error('blahblahblahblah'); nothing comes up. But if I do it on index.php it works.. What do I do so that i can use it globally?
  7. KEY: site_title - Value: Welcome to WoWCMS v1.0 KEY: exp_rate - Value: Instant 70 KEY: gray_rate - Value: 1 KEY: white_rate - Value: 1 KEY: green_rate - Value: 1 KEY: blue_rate - Value: 1 KEY: purple_rate - Value: 1 KEY: orange_rate - Value: 1 KEY: artifact_rate - Value: 1 KEY: allow_reg - Value: 1 KEY: site_on - Value: 1 KEY: root_dir - Value: C:/Program Files/xampplite/htdocs KEY: theme - Value: alliance KEY: license_code - Value: AZIT-3JH9-SDI5-H83F-23DIF echo $site_title gives me Welcome to WoWCMS v1.0 I got that, now how to i use them one at a time, say i needed to set the theme by doing require('templates/THEMEVALUE/index.tpl');
  8. $db = mysql_select_db('wowcms', $systemc); $sql = "SELECT value FROM wowcms_config WHERE setting = 'site_title'"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $site_title = $row["site_name"]; } Im using that, i've tried it everywhere... but nothing comes up.
  9. $use_db = mysql_select_db($system->config[dbname], $systemc); $db['site_title'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'site_title'")or die(mysql_error()); $db['exp_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'exp_rate'"); $db['gray_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'gray_rate'"); $db['white_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'white_rate'"); $db['green_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'green_rate'"); $db['blue_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'blue_rate'"); $db['purple_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'purple_rate'"); $db['orange_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'orange_rate'"); $db['artifact_rate'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'artifact_rate'"); $db['allow_reg'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'allow_reg'"); $db['site_on'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'site_on'"); $db['root_dir'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'root_dir'"); $db['theme'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'theme'"); $db['license'] = mysql_query("SELECT value FROM wowcms_config WHERE setting = 'license'");
  10. That doesnt work, I get message: "Resource ID #6". What else could I do?
  11. I am working on a cms and I have finished the install script. It creates a database called (yourprefix)_config. The config table has 2 columns, setting, and value. Say I have site_title in the setting column and MyCMS in the value column. How would I be able to retrieve and print the "MyCMS" value?
  12. Hey, I dont have a sample of code handy... but. Say im designing a register page, and if the passwords dont match, ill use die('Passwords are wrong'); but that means the error shows up, but what is supposed to be below it is gone.. Instead of using the die() command, how can i end the script without is cutting off half the page?
  13. Hello I was just wondering, how can I stop the script from continuing? If I use die(); it cuts off the rest of the page (html). So how can I end it without destroying the page. I mean... echo an error such as: "Passwords dont match". Then stop the script from continuing.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.