71
tcnet
Re: Adding the default XOOPSForm?
  • 2008/7/4 21:46

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


Use the class/xoopsform. Look in the xoopsform directory for the available form elements.

Submit form example:
// USER SUBMIT FORM
include XOOPS_ROOT_PATH."/header.php";
include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";

$formlabel =    _MD_ADDNEWLINK;
$formname "usersubmitform";
$formaction XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/submit.php';
$formmethod "post";
$formaddtoken "false";    
$btnlabel _MD_ADD;

$sform = new XoopsThemeForm($formlabel$formname$formaction$formmethod$formaddtoken "false");  
$sform->setExtra('enctype="multipart/form-data"');

// Title
$sform->addElement(new XoopsFormText(_MD_TITLE'title'4060$title), true);

// Description
$sform->addElement(new XoopsFormTextArea(_MD_DESCRIPTION'description',$description,4,50), true);

// Submit buttons
$button_tray = new XoopsFormElementTray('','');
$submit_btn = new XoopsFormButton('''post'$btnlabel'submit');
$button_tray->addElement($submit_btn);
$sform->addElement($button_tray);        
$sform->display();

The submitted form goes to submit.php

include "header.php"
$myts =& MyTextSanitizer::getInstance();

// TITLE
$title = isset($_POST["title"]) ? $myts->addSlashes(($_POST["title"]);

// DESCRIPTION
$description $myts->addSlashes($_POST["description"]);

$newid $xoopsDB->genId($xoopsDB->prefix("modulename_table")."_lid_seq");    

$sql sprintf("INSERT INTO %s (lid, title, description) VALUES (%u, '%s', '%s')"$xoopsDB->prefix("modulename_table"), $newid$title$description);    
$xoopsDB->query($sql);


I suggest studying Herve's News module for help. Take a look at news/submit.php and his submit form at news/include/storyform.inc.php.



72
tcnet
Re: Database server lost PLEASE help
  • 2008/6/14 11:24

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


The database is not stored in your XOOPS directory. It is in stored seperately.

Before you reinstall, you should confirm that your database is gone. Open your host server Cpanel, look for the MySql section and open phpMyadmin application. The db used with your XOOPS install should be listed on the left.



73
tcnet
Re: My points 1.0 - Feature Requests
  • 2008/6/3 16:03

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


Quote:
I´ll take a look on that, thanks for disapointing me, eheh!


OOPS! My intentions were to encourage not discourage your creativity. Many of us need a working rewards module like you are considering. Thanks for your efforts.



74
tcnet
Re: My points 1.0 - Feature Requests
  • 2008/6/2 15:52

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


Hi Trabis,

I would like a reward system where contributions are rewarded with site premiums or products. I have been testing the NCKarma module by ncnynl, it is still in beta but looks promising.

NCKarma uses plugins to hook to other modules, so that karma points are incremented with each contribution. In addition the admin can assign points to a member and members can give points to each other. Point Totals are used to assign User Levels and there is a catalog where members can redeem their karma points for premiums.

Anyways, You might take a look, it sounds very similiar to what you would like to create.

Thanks for your contributions to the XOOPS community!



75
tcnet
Re: meta description
  • 2008/5/16 13:10

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


Look in:
Control panel | system admin | preferences | meta tags and footer

also check site name and slogan in

Control panel | system admin | preferences | general settings



76
tcnet
Re: smartfactory modules are ADWARES
  • 2008/4/14 0:17

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


<!-- <div style="display: none;"><{$ref_smartfactory}></div> -->


From Google Webmaster Help Center: Hidden text and links
URL:http://www.google.com/support/webmasters/bin/answer.py?answer=66353

Quote:

Hiding text or links in your content can cause your site to be perceived as untrustworthy since it presents information to search engines differently than to visitors. Text (such as excessive keywords) can be hidden in several ways, including:

Using white text on a white background*
Including text behind an image
Using CSS to hide text*
Setting the font size to 0
Hidden links are links that are intended to be crawled by Googlebot, but are unreadable to humans because:
The link consists of hidden text (for example, the text color and background color are identical).
CSS has been used to make tiny hyperlinks, as little as one pixel high.
The link is hidden in a small character - for example, a hyphen in the middle of a paragraph.

If your site is perceived to contain hidden text and links that are deceptive in intent, your site may be removed from the Google index, and will not appear in search results pages. When evaluating your site to see if it includes hidden text or links, look for anything that's not easily viewable by visitors of your site. Are any text or links there solely for search engines rather than visitors?

snip

If you do find hidden text or links on your site, either remove them or, if they are relevant for your site's visitors, make them easily viewable. If your site has been removed from our search results, review our webmaster guidelines for more information. Once you've made your changes and are confident that your site no longer violates our guidelines, submit your site for reconsideration.


* I have seen both of these used in some module templates and they may hurt your SE rankings.



77
tcnet
Re: Can a single iframe display differing website links?
  • 2008/2/25 12:40

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


If I understand correctly, the external url is already stored in your db, has been assigned to a variable and you can display that variable as a text link on the article's page.

All thats left to do is add an iframe to the smartsection_item.html template to display the external webpage for each article.

templates/smartsection_item.html around line 27
After:
<
div class="itemText">
   <{
$item.maintext}>
</
div>

Add:
<
iframe SRC='<{$yourvariable}>' scrolling='no' width='100%' height='290' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0'>
</
iframe>


Don't forget to update the module after editing the template.



78
tcnet
Re: How to use Tag Cloud 1.60 ?
  • 2008/1/15 2:28

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


The TAG module instructions provide the code a module builder needs to TAG enable their module.

If the modules you use are Tag enabled (Article, CBB, WebShow) all you need to do is install the TAGS module. The other modules will then display tag input areas on their submit forms, show the tag bar in their templates and provide a Module Tag Cloud in blocks admin.

Once you have entered some terms, TAG module's pages and Sitewide Cloud blocks will display combined TAGS from all enabled modules. You can turn the TAG module off in the main menu and just display Module TAG Clouds if desired.



79
tcnet
Re: Recent Posts Module?
  • 2008/1/10 16:38

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


What's Newwill display the most recent posts from the modules you select. You may have to make plugins for modules not included.

It will also create a RSS feed pulled from all module's recent posts.



80
tcnet
Re: Link Anchorage for better SEO Scores - SEO Tip #1
  • 2008/1/2 2:16

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


The content of this post is not suitable for our general audience.




TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 21 »



Login

Who's Online

147 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits